Configuring Whitespace After Comment Rules
There is a rule which will check for a whitespace after --
in a single line comment.
This behavior can be modified by using the exceptions
and patterns
options.
Option | Default | Description |
---|---|---|
exceptions | --! , --| , --= , --+ , --- |
A list of patterns to not insert whitespace after comment characters -- .
Each exception must start with -- and not more than three characters long.
Exceptions not starting with -- will be ignored. |
patterns | --! , --| |
A list of patterns to insert whitespace after comment characters -- .
Each pattern must start with -- and there is not restriction on length.
Patterns not starting with -- will be ignored. |
This is an example of how to configure these options.
rule :
comment_100 :
exceptions :
- '--!'
- '--*'
patterns :
- '--!'
- '--*'
Example
Using the default values, the following comments
--% Comment 1
--!Comment 2
-----------
… would be correct to
-- % Comment 1
--! Comment 2
-----------