Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Developer Team

Pages: [1]
Announcements / Release 2.4.0 now available!
« on: 01 May, 2020, 12:03:23 »
Code Checker release 2.4.0 is now available for download!

New features include:
  • Use the Configuration Editor to edit your configurations interactively.
  • Five new checks:
    • checkAvoidComments checks whether your comments start with words such as 'NOTE', 'WIP', 'todo' (these are configurable).
    • checkBuiltinFunctionCompatibility lets you check whether there are any built-in functions called that are not available yet in the MATLAB release you configure.
    • checkEditorWarnings reports any warnings shown to the user in the MATLAB editor (also known as mlint warnings).
    • checkMissingSemicolon checks whether any lines of code produce output that can be prevented by adding a semicolon to the end.
    • checkSubFunction reports all local (sub) functions used in the checked code.
  • Compatible with MATLAB R2020a.

Get Code Checker for MATLAB v2.4.0 now by going to our webshop. If you are already using Code Checker for MATLAB, upgrade to release 2.4.0 using the instructions provided here.

The issue:
Although after entering the license information the license is considered valid, the license cannot be activated in MATLAB R2017a or earlier.

After attempting activation the license status in the dialog shows:

The cause
This behavior may be related to the fact that the License Activation Server for Code Checker for MATLAB uses LetsEncrypt certificates.

Per LetsEncrypt root certificates are not included in Java 7 < 7u111 and Java 8 < 8u101.

MATLAB R2017a and earlier ship with Java Runtime Environments that do not include the LetsEncrypt root certificates
To still use Code Checker for MATLAB with these MATLAB versins, the Let's Encrypt certificates  must be included in the MATLABs Java keystore.

The solution
Option 1
Code Checker for MATLAB comes with a utility and the certificates to update the MATLAB Java keystore.
It is necessary to have write access to the keystore, therefore run MATLAB as administrator and run:

Code: [Select]
Certficates may be removed of "forcefully" reinstalled by running:

Code: [Select]

Code: [Select]

Option 2
Alternatively you may install the certificates manually (it is necessary to have write access to the keystore).

1. Find the LetsEncrypt certificates here:

    Our utility installs:
  • ISRG Root X1 (self-signed)
  • Let’s Encrypt Authority X3 (IdenTrust cross-signed)
  • Let’s Encrypt Authority X3 (Signed by ISRG Root X1)
  • Let’s Encrypt Authority X4 (IdenTrust cross-signed)
  • Let’s Encrypt Authority X4 (Signed by ISRG Root X1)

2. MATLAB code to compose the system commands that add the certificates to the keystore (replace "letsEncryptCertAlias" and "letsEncryptCertFile" with the appropriate alias and file).
Code: [Select]
myKeystore = fullfile(matlabroot, 'sys', 'java', 'jre', computer('arch'), 'jre', 'lib', 'security', 'cacerts');
myKeytool  = fullfile(matlabroot, 'sys', 'java', 'jre', computer('arch'), 'jre', 'bin', 'keytool');
systemAddTrustCACertCommand = [...
            '"', myKeytool, '" -trustcacerts ', ...
            '-keystore "', myKeystore, '" ', ...
            '-alias ', 'letsEncryptCertAlias', ' ', ...
            '-storepass changeit ', ...
            '-noprompt ', ...
            '-importcert ', ...
            '-file "', 'letsEncryptCertFile', '"'];

Checks configuration / How do I edit the check configurations?
« on: 05 August, 2019, 09:14:38 »
In order to make the checks reflect your coding guidelines, you need to edit the check configurations. When running Code Checker for MATLAB for the first time, a configuration file with default values for all checks will be created and activated.

Accessing the configuration file
The configuration file (XML) can be accessed in the following ways:
  • In the GUI on the Configuration tab, select the configuration file you want to use and click the Edit button
  • In a report, there are several links to the configuration file that was used for the Code Checker for MATLAB run:
    • In the Meta data section at the top of the report, click the Edit button on the Configuration file row.
    • At a results table, click Edit check configuration to open the configuration file at the position of that specific check.
    • At a results table, click Edit after a parameter's name to open the configuration file at the position of that parameter.
  • In the command window, type edit(monkeyproof.cc4m.getActiveConfigurationFile(‘full’))

Editing the configuration file
The configuration file contains multiple elements, most of which can be edited. For example, you can disable a check by changing the value of its <enabled> element to 0 or attach a link to the guideline using the guidelineLink element. To configure a parameter, go to the relevant <parameter> element in the configuration file and change the value or description. Keep an eye on the parameter's constraints defined by alloweditem or allowedmin/allowedmax elements. Changing these constraints in the configuration file has no effect because they are only there for reference.

The following things can be configured for every check:
  • Description
  • Category
  • Guideline ID and link
  • Enabled/disabled
  • Priority
  • For every parameter of the check:
    • Description
    • Value(s)

Using the edited configuration file
After editing the guideline configurations file, save it and just start a Code Checker for MATLAB run. Any changes will be applied immediately.

When you update to a newer version of Code Checker for MATLAB, the configuration file you use to customize the checks and reports remains valid. However, the list of checks and configurable parameters may be expanded. When you run the new checks, they will be enabled using default values. If you wish to configure these as well, you want to add them to your configuration file. Here’s two ways to do that:
•   In the Configuration tab of the GUI, click the Update button.
•   In the command window, enter monkeyproof.cc4m.updateConfigurationFile to update the currently active configuration file. By providing a configuration file as an input, you can update a specific configuration file.

Comments and empty lines in your configuration file get lost in this process, so keep this in mind!

Code Checker for MATLAB can be purchased at our webshop.

Code Checker for MATLAB is provided as a separate Toolbox (“CC4M_x.x.x.mltbx”). The steps for obtaining it are described in the webshop. To install the tool, double-click the add-on installation file in the MATLAB Current Folder browser. Alternatively, install Code Checker for MATLAB from the command line using matlab.addons.toolbox.installToolbox. The add-on installation procedure of MATLAB gives no hint on whether the installation is successful, but you can continue directly after installing Code Checker for MATLAB. The files are installed in the default Add-Ons folder which is userpath\Add-Ons folder. The userpath is the path returned by the userpath command.

Once Code Checker for MATLAB is installed as an add-on in one MATLAB version, it is available in every MATLAB installation on your system that is configured to have add-ons in the selected installation folder.

To verify the installation, run monkeyproof.cc4m.start from the command window. This should open the license activation dialog. After successful activation of the license you should have received per e-mail, the Code Checker for MATLAB GUI should open, a shortcut is created and you can start checking your code.

Announcements / Welcome
« on: 01 August, 2019, 13:35:25 »
Welcome to the Code Checker for MATLAB (CC4M) forum!

This forum is used to post questions, answers, announcements, and enhancement requests regarding Code Checker for MATLAB. It is actively monitored by the support staff of MonkeyProof Solutions.

Before creating a new topic, search the forum to see if your question or enhancement request has not been posted before. After successfully installing Code Checker for MATLAB, you can also consult the documentation by opening the GUI and going to the About tab.

If you want to create a new topic or post, please include any information you deem relevant. For example: the MATLAB version you are running or the Code Checker for MATLAB version you are using.

Stay safe and happy coding!

Announcements / Release 2.3.0 now available!
« on: 01 August, 2019, 13:34:16 »
MonkeyProof Solutions is pleased to announce that Code Checker for MATLAB v2.3.0 is now available! This release features among others:
  • Twelve new checks and reports. Some of the highlights are:
    • Check the number of lines of code in a function or file.
    • Check if nested and local functions use certain prefixes.
    • Set a maximum nesting depth for code blocks and check if it is ever violated.
    • Report the mex-files required for your code and identify which extensions are missing.
  • Major report improvements:
    • Added pagination of results so that many violations or many checked files does not result in very large tables.
    • All tables are now searchable which allows you to filter specific results easily.
    • All tables are now collapsable and expandable, improving readabillity and navigatability.
    • Improved visuals: fonts are more readable and tables are clearly separated entities.
  • Configuration files can now be updated automatically when new checks and parameters are added to Code Checker for MATLAB. See the Configuration tab in the GUI.
  • Added auto-fixers for three checks. These are accessible from the report.
  • Improved robustness, feedback and reliability

Get Code Checker for MATLAB v2.3.0 now by going to our webshop at

Pages: [1]