All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.yaml.rules.yaml.CommentsCheck.html Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version

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