SonarQube version: 6.3+ – Date: February 2018

Main concepts

Quality Gates : Set of boolean conditions based on measure thresholds
against which projects are measured during a period.

Blocker Issues equals 0
Code Coverage is greater than 80%

Rules: rules are executed on source to generate issues. Three basic types of rules: Reliability, Maintainability and Security

Rule definition:

  • Language
  • Type: bug, vulnerability, code smell
  • Tag
  • Repository
  • Status: beta, deprecated, ready

Example:

".equals()" should not be used to test the values of "Atomic" classes
Language: Java
Type: bug
Tag: multi-threading
Repository: N/A
Status: ready

Quality profiles : Collections of rules to apply during an analysis.
Each language has a default profile

Metric : A type of measurement. Examples: number of lines of code, number of duplicated blocks, complexity etc.

Reliability : code that can produce operational risks or unexpected behavior at runtime. Must of time it’s the consequence of lack of compliance with best practice