Unexpected additional newlines at the end of the file. Open
= render "associations", photo: @photo
- Create a ticketCreate a ticket
- Exclude checks
Expected a newline at the end of the file. Open
= render "associations", photo: @photo
- Create a ticketCreate a ticket
- Exclude checks
Hash attribute should end with one space before the closing brace Open
.row{id: "photo-#{@photo.id}"}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
HamlLint/SpaceInsideHashAttributes
Check the style of hash attributes against one of two possible preferred
styles, space
(default) or no_space
:
Bad: inconsistent spacing inside hash attributes braces
haml
%tag{ foo: bar}
%tag{foo: bar }
%tag{ foo: bar }
With default space
style option: require a single space inside
hash attributes braces
haml
%tag{ foo: bar }
With no_space
style option: require no space inside
hash attributes braces
haml
%tag{foo: bar}
This offers the ability to ensure consistency of Haml hash attributes style with ruby hash literal style (compare with the Style/SpaceInsideHashLiteralBraces cop in Rubocop).
Hash attribute should start with one space after the opening brace Open
.row{id: "photo-#{@photo.id}"}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
HamlLint/SpaceInsideHashAttributes
Check the style of hash attributes against one of two possible preferred
styles, space
(default) or no_space
:
Bad: inconsistent spacing inside hash attributes braces
haml
%tag{ foo: bar}
%tag{foo: bar }
%tag{ foo: bar }
With default space
style option: require a single space inside
hash attributes braces
haml
%tag{ foo: bar }
With no_space
style option: require no space inside
hash attributes braces
haml
%tag{foo: bar}
This offers the ability to ensure consistency of Haml hash attributes style with ruby hash literal style (compare with the Style/SpaceInsideHashLiteralBraces cop in Rubocop).
Files should end with a trailing newline Open
= render "associations", photo: @photo
- 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 ) |