Use -#
for comments instead of - #
Open
- # this planting has harvests
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
HamlLint/RubyComments
Prefer HAML's built-in comment over ad hoc comments in Ruby code.
Bad: Space after #
means comment is actually treated as Ruby code
haml
- # A Ruby comment
Good
haml
-# A HAML comment
While both comment types will result in nothing being output, HAML comments are a little more flexible in that you can have them span multiple lines, e.g.
-# This is a multi-line
HAML comment
Use -#
for comments instead of - #
Open
- # no harvests yet, so use predicted harvest
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
HamlLint/RubyComments
Prefer HAML's built-in comment over ad hoc comments in Ruby code.
Bad: Space after #
means comment is actually treated as Ruby code
haml
- # A Ruby comment
Good
haml
-# A HAML comment
While both comment types will result in nothing being output, HAML comments are a little more flexible in that you can have them span multiple lines, e.g.
-# This is a multi-line
HAML comment
Expected a newline at the end of the file. Open
= week_number
- Create a ticketCreate a ticket
- Exclude checks
Files should end with a trailing newline Open
- else
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
HamlLint/FinalNewline
Files should always have a final newline. This results in better diffs when
adding lines to the file, since SCM systems such as git
won't think that you
touched the last line if you append to the end of a file.
You can customize whether or not a final newline exists with the present
option.
Configuration Option | Description |
---|---|
present |
Whether a final newline should be present (default true ) |