Getting Started
Installation
CC4M is provided as a MATLAB Toolbox CodeCheckerForMATLAB_vxxx.mltbx
. To install the toolbox, double click
the add-on installation file in the MATLAB Current Folder browser.
Alternatively, install CC4M from the command window using
matlab.addons.toolbox.installToolbox
.
The add-on installation procedure gives no hint on whether the
installation is successful, but you can continue directly after
installing CC4M. The files are installed in the Add-Ons folder that is configured in the Preferences on the MATLAB > Add-Ons tab.
Once CC4M 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.
Prevent Java path issues
CC4M relies on Java functionality. To prevent issues with the Java path, CC4M adds all the Java code to the static javaclasspath. After installing a restart of MATLAB is required.
Online activation
- Once installed run the software by entering
monkeyproof.cc4m.start()
at the MATLAB command line. - The first time the software is run (i.e. when no valid license file can be found), the license dialog pops up.
- Enter the license information you received per email:
- Product key
- User name
- Company
Off-line activation
- Once installed run the software by entering
monkeyproof.cc4m.start()
at the MATLAB command line. - The first time the software is run (i.e. when no valid license file can be found), the license dialog pops up.
- Press the "Show hardware IDs" button and return these IDs to us by replying to this email.
- We will then provide you with a license file.
- Save this license file to the default license file location (keep the filename intact); when you run the commands below in MATLAB, it will give you the default folder (and create it):
Alternatively, you can save the license file to any convenient location and then set an environment variabletheSettings = settings(); defaultFolder = fullfile(theSettings.matlab.addons.InstallationFolder.ActiveValue, 'Licenses') folderCreated = mkdir(defaultFolder)
MONKEYPROOF_LICENSE_FILE_FOLDER
to point to the folder containing the license file.- The environment variable can be set at system level (the environment variable will only be visible afterwards in a new MATLAB session).
- From within MATLAB (for the duration of the MATLAB session) you can set the environment variable by issuing the following command before starting CC4M (assuming the license file is in the current working directory):
setenv('MONKEYPROOF_LICENSE_FILE_FOLDER', pwd)
.
Complete and verify installation: check M-code
To verify that the installation is successful, run
monkeyproof.cc4m.start
. The following
application should appear after you have activated your license:
Now you can specify what to check and start the run. The different options are discussed in further detail in section The CC4M user interface.
During the first call, the installation procedure is completed. This includes creating a default configuration - having all checks enabled with default parameter values, priority and severity level. After installation the predefined configuration MonkeyProof MATLAB Coding Standard++ becomes active. For more information on check configurations, see Configuration.
Shortcut for the MATLAB Editor
Calling monkeyproof.cc4m.start
for the first
time creates a shortcut in the MATLAB Shortcuts Toolstrip. The
shortcut opens the CC4M user interface. It will show up in the top-right
corner of MATLAB:
For MATLAB releases prior to R2018a, the shortcut is not automatically available on the quick access toolbar. To add the shortcut to the quick access toolbar, edit the shortcut and select the "Add to quick access toolbar" option. To add a label to the shortcut, select the "Show label on quick access toolbar" option. For more information see MATLAB documentation.
Getting help and reporting feedback
For questions, feedback or issues, contact us via support@monkeyproofsolutions.nl . Please add the summary of your question or issue in the post's subject, and put a detailed description, if applicable the steps to reproduce, additional information (at least the CC4M and MATLAB version) and the priority you have with the question/issue in the contents of the post.
In case of errors, please include the full error message and -if possible- also include the file or model that triggers the error when analyzed or checked so that the problem can be reproduced (and fixed).
License Dialog
License Information
- License ID The license ID is a unique reference to the license, created when the license was purchased.
- Activation ID The activation is a unique reference to an activation, created when the license was activated.
- License status Shows the current status of the license (validity and activation). If the text in this field is red, either action is required or an error occurred.
- No license The license file has not been found: use the "Change product key" and specify the requested details.
- Validation: LICENSE_VALID Activation: ACTIVATION_REQUIRED The license needs to be activated: use the "Activate" button.
- Other Contact support for assistance.
- Expiration date This is the expiration date of the license.
User Information
- Name Name of the user to which the product is licensed.
- Email Email address used to purchase the license.
- Company Company of the licensee.
Change Product Key
Specify the product key sent to you by email and the user's name and company as were specified during purchase.
Activate
When the Activate button is clicked, the Activation Dialog appears. It shows the end user license agreement, which needs to be accepted to activate the license.
Deactivate
Deactivates the license to make it available for activation on another machine. The number of allowed deactivations is limited.
Show Hardware IDs
The Hardware IDs dialogs shows the IDs of a number of properties that can be used for offline activation. The right-click menu offers the option to copy all IDs to the clipboard.
Enter Modification Key
If you receive a license modification key, you can enter it here.
Show EULA
Shows the end user license agreement.