ServiceInnovationLab/RapuTure

View on GitHub
app/views/layouts/mailer.html.haml

Summary

Maintainability
Test Coverage

Hash attribute should end with one space before the closing brace
Open

    %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/

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).

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/

HamlLint/RuboCop

Option Description
ignored_cops Array of RuboCop cops to ignore.

This linter integrates with RuboCop (a static code analyzer and style enforcer) to check the actual Ruby code in your templates. It will respect any RuboCop-specific configuration you have set in .rubocop.yml files, but will explicitly ignore some checks that don't make sense in the context of HAML documents (like Style/BlockAlignment).

-# example.haml
- name = 'James Brown'
- unused_variable = 42

%p Hello #{name}!

Output from haml-lint example.haml:3 [W] Useless assignment to variable - unused_variable

You can customize which RuboCop warnings you want to ignore by modifying the ignored_cops option (see config/default.yml for the full list of ignored cops).

You can also explicitly set which RuboCop configuration to use via the HAML_LINT_RUBOCOP_CONF environment variable. This is intended to be used by external tools which run the linter on files in temporary directories separate from the directory where the HAML template originally resided (and thus where the normal .rubocop.yml would be picked up).

Displaying Cop Names

You can display the name of the cop by adding the following to your .rubocop.yml configuration:

AllCops:
  DisplayCopNames: true

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/

HamlLint/RuboCop

Option Description
ignored_cops Array of RuboCop cops to ignore.

This linter integrates with RuboCop (a static code analyzer and style enforcer) to check the actual Ruby code in your templates. It will respect any RuboCop-specific configuration you have set in .rubocop.yml files, but will explicitly ignore some checks that don't make sense in the context of HAML documents (like Style/BlockAlignment).

-# example.haml
- name = 'James Brown'
- unused_variable = 42

%p Hello #{name}!

Output from haml-lint example.haml:3 [W] Useless assignment to variable - unused_variable

You can customize which RuboCop warnings you want to ignore by modifying the ignored_cops option (see config/default.yml for the full list of ignored cops).

You can also explicitly set which RuboCop configuration to use via the HAML_LINT_RUBOCOP_CONF environment variable. This is intended to be used by external tools which run the linter on files in temporary directories separate from the directory where the HAML template originally resided (and thus where the normal .rubocop.yml would be picked up).

Displaying Cop Names

You can display the name of the cop by adding the following to your .rubocop.yml configuration:

AllCops:
  DisplayCopNames: true

Hash attribute should start with one space after the opening brace
Open

    %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/

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).

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

    %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/

HamlLint/RuboCop

Option Description
ignored_cops Array of RuboCop cops to ignore.

This linter integrates with RuboCop (a static code analyzer and style enforcer) to check the actual Ruby code in your templates. It will respect any RuboCop-specific configuration you have set in .rubocop.yml files, but will explicitly ignore some checks that don't make sense in the context of HAML documents (like Style/BlockAlignment).

-# example.haml
- name = 'James Brown'
- unused_variable = 42

%p Hello #{name}!

Output from haml-lint example.haml:3 [W] Useless assignment to variable - unused_variable

You can customize which RuboCop warnings you want to ignore by modifying the ignored_cops option (see config/default.yml for the full list of ignored cops).

You can also explicitly set which RuboCop configuration to use via the HAML_LINT_RUBOCOP_CONF environment variable. This is intended to be used by external tools which run the linter on files in temporary directories separate from the directory where the HAML template originally resided (and thus where the normal .rubocop.yml would be picked up).

Displaying Cop Names

You can display the name of the cop by adding the following to your .rubocop.yml configuration:

AllCops:
  DisplayCopNames: true

There are no issues that match your filters.

Category
Status