This document guides you on how to enable the Salesforce Metadata (BETA) rules on our cloud environment.
Starting by logging-in, click on the quality profiles on your main organization page and create a new rule by selecting the language as Salesforce Metadata (BETA) and a name as in the images below
Once you have created the new quality profile, you will be taken to a new page where you can click on Activate More button on the left side.
Now make sure on your left side of the page where you see the name of the rule you created, it is marked as inactive on the filters. This display the list of rules that you can activate
Make sure that you activate the four rules mentioned below by clicking on the Activate button beside the rule.
- Record Type ID is Missing
- Object Permissions should not be permissive
- Enforce Org Security Settings
- Custom fields must have a description field
Once activated, select the active button under filters (beside the name of the rule) to check if you can see them there, as in the image.
Now, go to the project you wish to run the analysis with these rules and click on Administration > General settings.
Select the CodeScan tab on the page which you see next and scroll down to Scope, where you see Metadata File Suffixes
Now, add the following suffixes for classic project and save it as in the image:
For sfdx projects, add the suffixes as,
Now, run the analysis. If your metadata files contain issues, you will see that reflected in the issues list.
Note that the line count will not show up on the line count breakdown as it is not a “language“, however the issues will show up in the issues list as seen below:
If you still have trouble setting it up after reading the whole documentation carefully, reach out to support and we will be able to assist you.