Common Issues and Solutions

Error: "Salesforce\force-app\main\default\applications\Chatter_Delete_Blocker.app-meta.xml"

Error InformationSteps for Resolution

Descriptions: Getting an error “Salesforce\force-app\main\default\applications\Chatter_Delete_Blocker.app-meta.xml” when writing a custom SonarQube rules using the Xpath Template rule for Salesforce Metadata (sfmeta:XPathRule). Causes: The analysis is looking for a match with a file name and the suffix entered in the field, but it cannot find any, which is why the above error is thrown.

  1. This is expected behavior because Codescan cannot decide which rules to apply to the files.

    • To remove file patterns listed for sonar.lang.patterns.xml, navigate to Project Settings > General Settings > Language

Error: CodeScan analysis is getting failed with the error "Job took long. We will attempt to rerun with more memory"

Error InformationSteps for Resolution

Descriptions: CodeScan analysis is getting failed with the error "Job took long. We will attempt to rerun with more memory." Causes: This error may occur for projects having huge metadata.

  1. Increase the Project's Java heap memory size to analyze the project sources.

    • On the CodeScan's Project page, navigate to Project Settings > Project Analysis.

    • Click on the Edit Project button.

    • Update the Project Memory by selecting the required memory from the drop-down. The memory size can be overridden and increased at the organization level.

  2. Check for the rule "Avoid Cleartext Transmission of Sensitive Information in the default quality profile"in your default quality profile. If available, please deactivate it. Use the steps mentioned below:

    • Create a new quality profile for Apex language.

    • Deactivate the "Avoid Cleartext Transmission of Sensitive Information in the default quality profile" rule.

    • Set the newly created profile as default.

For detailed steps, please refer to the article: Customising Quality Profiles

Last updated