×

Code Quality Initiative

Author: Kelley MacEwen
Categories: [‘Building Blocks’, ‘Tutorials’]
Tags: [‘develop’, ‘best practice’, ‘b2’, ‘tutorials’, ‘migrated from edugarage’, ‘sonar’, ‘.html’, ‘static code analysis’, ‘code quality’, ‘developer’]


Why Code Quality Matters

Challenges with Code Quality

Sonar – Quality Management Platform

http://www.sonarsource.org/

Static Code Analysis (SCA)

Downloads

Blackboard Learn custom PMD rules and Sonar Java profile

The latest version is attached to this post. Please install Blackboard custom PMD rules before importing Java rule set.

How to install Blackboard custom PMD rules:

  1. Copy bb-.html-rules.jar and bb-rules-sonar.xml files to ${Sonar_Home}/extensions/rules/.html
  2. Make sure the files have read rights for Sonar
  3. Restart Sonar server
  4. Verify that Bb* rules exist from a Java profile’s coding rules list

How to use Blackboard’s Java rule set:

  1. Log in to Sonar as a user with Administrators role
  2. Navigate to “Configuration” -> “Quality Profiles”
  3. Click on “Restore profile” link located on the top right of the page
  4. Select bb-sonar-profile-java.xml and click on “Restore profile” button
  5. Specify the Sonar analysis configuration to use the restored profile