Monday, June 1, 2015

Salesforce Static Code Analysis using codescan.villagechief.com

Salesforce Static Code Analysis .



Like many other sophisticated programming language there is Static Code Analysis tool available by codescan.villagechief.com. This code review tool can give us lots of benefits. I have listed some of them bellow.


• Warning on some governor limits  - for ex SOQL in loops

• Coding standards: naming conventions, fields at top of file, etc

• Redundant code


• Code simplification suggestions

• Clean code, less mistakes less bugs


So, now the question is hot to set up Static Code Analysis tool? 

There are 2 ways you can use a) Eclips IDE  2) Set up SonarQube Server

Setting SonarQube Server is little tricky and it need licence from codescan.villagechief.com so for now lets focus on how to set up Eclips IDE

Steps to install CodeScan Apex PMD Eclipse Plugin:
1.In Eclipse go to Help -> Install new Software-> use http://codescan.villagechief.com/eclipse/ link to install plugin


2) Select the plugin and click next next...

3) After successful installation of plugin, Go to project Explorer -> Right click on your sales-force project -> ApexPDM -> run ApexPDM


4) To view Codescan result, goto ApexPDM view 
5) You can run ApexPDM on specific class also


You can scan your code online.Goto http://codescan.villagechief.com/report/index Paste your class for code analysis

5) 

1 comment:

  1. Nice list of code review tool. Tools listed in this blog is very good. Code review tools are very important tool for web developers. Generally many listed open source code review tools are used by developers.
    application security requirements

    ReplyDelete