Skip to content

mukteshkrmishra/sonar-jproperties-plugin

Repository files navigation

SonarQube Java Properties Plugin

Build Status Quality Gate

Description

This plugin enables code QA analysis of Java Properties files within SonarQube:

  • Computes metrics: lines of code, comments lines, etc.
  • Performs more than 15 checks such as: Duplicated keys should be removed, Property with empty value should be removed, Separators should follow a convention, etc.

Useful Links

Usage

  1. Download and install SonarQube
  2. Install the Java Properties plugin either by a direct download or through the Update Center.
  3. Install your favorite analyzer (SonarQube Runner, Maven, etc.) and analyze your code.

Notes

  • Java properties files are expected to be encoded in ISO-8859-1 as stated in Java specifications. During analysis, the following error may indicate that the file is not encoded in ISO-8859-1:

     Caused by: java.lang.IllegalArgumentException: Unable to highlight file \[moduleKey=xxx, relative=xxx, basedir=xxx\] from offset 808 to offset 876
      at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:85)
      at org.sonar.batch.source.DefaultHighlightable$DefaultHighlightingBuilder.highlight(DefaultHighlightable.java:79)
      at org.sonar.jproperties.ast.visitors.SyntaxHighlighterVisitor.visitNode(SyntaxHighlighterVisitor.java:93)
      at com.sonar.sslr.impl.ast.AstWalker.visitNode(AstWalker.java:114)
      ...
    

About

SonarQube Java Properties Plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published