org.sonar.l10n.yaml.rules.yaml.CommentsCheck.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-yaml-plugin Show documentation
Show all versions of sonar-yaml-plugin Show documentation
YAML 1.1 plugin for SonarQube
Use this rule to control the position and formatting of comments.
Parameters
- require-starting-space
- Use
require-starting-space
to require a space character right after the #
. Set to true
to enable, false
to disable.
- min-spaces-from-content
- Is used to visually separate inline comments from content. It defines the minimal required number of spaces
between a comment and its preceding content.
Examples
With require-starting-space = true
the following code snippet would PASS:
# This sentence
# is a block comment
the following code snippet would PASS:
##############################
## This is some documentation
the following code snippet would FAIL:
#This sentence
#is a block comment
With min-spaces-from-content = 2
the following code snippet would PASS:
x = 2 ^ 127 - 1 # Mersenne prime number
the following code snippet would FAIL:
x = 2 ^ 127 - 1 # Mersenne prime number
© 2015 - 2024 Weber Informatics LLC | Privacy Policy