Skip to content

Latest commit

 

History

History
74 lines (53 loc) · 2.21 KB

configuring_whitespace_after_comment_rules.rst

File metadata and controls

74 lines (53 loc) · 2.21 KB

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 no 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
-----------

Rules Enforcing Whitespace After Comment