* Your code is your asset * Keeps your cost down as you grow * Increase robustness, maintainability, security, performance, scalability, extensibility, etc. * Prevention is the best medicine
h3. Challenges with Code Quality
* Often talked about in theory but not actually practiced * Hard to measure or prove * Difficult to plan and prioritize
h3. Sonar -- Quality Management Platform
[http://www.sonarsource.org/]
* Open source and extensible * Manages code quality with ** Views of all projects at a glace, drill down to source code, differential, hotspots ** Coding Rules ** Unit Tests ** Standard Metrics ** Time Machine ** Integration with tools such as PMD, Findbugs, Checkstyle, JSLint, Clover, Cobetura, Hudson (many plugins available)
h3. Static Code Analysis (SCA)
* Applies rules to find potential bugs, anti-patterns, and code style violations * Catches problems as early as possible in the development process * A well-established industry practice for validating the quality of source code * Can be automated and tracked by tools like Sonar
h3. Downloads
h5. Blackboard Learn custom PMD rules and Sonar Java profile
Click [here|http://www.edugarage.com/download/attachments/106332210/bb_sonar_01.zip] to download the latest version. Please install Blackboard custom PMD rules before importing Java rule set.
How to install Blackboard custom PMD rules:
...
# Copy bb-pmd-rules.jar and bb-rules-sonar.xml files to $\{Sonar_Home}/extensions/rules/pmd # Make sure the files have read rights for Sonar # Restart Sonar server # Verify that Bb\* rules exist from a Java profile's coding rules list
How to use Blackboard's Java rule set: # Log in to Sonar as a user with Administrators role # Navigate to "Configuration" \-> "Quality Profiles" # Click on "Restore profile" link located on the top right of the page # Select bb-sonar-profile-java.xml and click on "Restore profile" button # Specify the Sonar analysis configuration to use the restored profile