Upgrade notes
- We’ve made a few changes to the Quality Profiles. Specifically, adding Duplication rules by default. If you don’t want to use the new rules, you should make a copy of the current Quality Profile and use that.
- Since v4.1.6, only Salesforce tests that have NO package namespace OR namespaces listed in the MetadataPackage are run. This may affect your project's code coverage when upgrading.
Release notes
SonarQube™ 7.3 Support
As of CodeScan v4.1.4.
SFDX Code Coverage Support:
CodeScan can now use test coverage files provided by your SFDX project to display code coverage in SonarQube™. Information on setting this up is available in the SFDX Code Coverage Tutorial
New Apex Rules
- System.assertEquals argument order
- If the arguments provided to the assertEquals method are reversed the test will have unexpected results. (v4.1.4)
- Empty Switch Label
- Avoid ‘switch’ statements where a label is defined but nothing is in it. (v4.1.4)
- Switch Statement is Too Dense
- A high ratio of statements to labels in a switch statement implies that the switch statement is overloaded. (v4.1.5)
- Switch Statements Should Have a When Else Case
- Switch statements should always use a 'when else' case to account for all values and avoid unexpected functionality. (v4.1.5)
- Switch Statements Should Not Be Empty
- Empty switch statements serve no purpose and should be removed. (v4.1.5)
- Too Few Branches for a Switch Statement
- Switch statements with fewer branches should use an if-else statement to increase code readability. (v4.1.5)
New Visualforce Rules
- Avoid Using Dot Namespace
- Avoid using apex. Component notation for namespaces. (v4.1.4)
Bug Fixes:
- Parser fixes for Summer ‘18 update. (v4.1.4, v4.1.5)
- Fix for CodeScan for Lightning support (v4.1.6)