CodeScan for Visual Studio Code
CodeScan is a Visual Studio Code extension that provides on-the-fly feedback to developers on new bugs and quality issues injected into Apex and VisualForce code.
How it works
Simply open a Apex or VisualForce file, start coding, and you will start seeing issues reported by CodeScan. Issues are highlighted in your code, and also listed in the 'Problems' panel.
You can access the detailed rule description directly from your editor, using the provided contextual menu.
You can find all available rules descriptions on the dedicated CodeScan website.
You will need:
You can check for the analysis status from the output window under CodeScan.
You can check for any errors here by going to Help > Toggle Developer Tools to bring up the console.
You can connect CodeScan to SonarQube >= v6.7.4 or CodeScan Cloud to benefit from the same rules and settings that are used to inspect your project on the server. CodeScan then hides in VSCode the issues that are marked as Won’t Fix or False Positive.
To configure the connection, have a look at CodeScan in default user settings.
If you change something on the server such as the quality profile, you can trigger an update of the local cache using the "Update CodeScan binding to SonarQube/CodeScan Cloud" command on the command palette (search for "codescan").
For security reasons, the token should not be stored in SCM with workspace settings.
Contributions and license
CodeScan for Visual Studio Code is open source under the LGPL v3 license. Feel free to submit Pull Requests.
The preferred way to discuss about CodeScan is by posting on the CodeScan Support Page. Feel free to ask questions, report issues, and give suggestions.