ServiceInnovationLab/RapuTure

View on GitHub

Showing 208 of 212 total issues

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

              %img{alt: "OpenFisca", height: "24", src: "https://openfisca.org/img/logo-openfisca.svg"}/

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

          %a{href: "https://github.com/openfisca/openfisca-core"} source code

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

The = symbol should have one space separating it from code
Open

      %p.card-text=variable.description
Severity: Info
Found in app/views/variables/_card.haml by haml-lint

HamlLint/SpaceBeforeScript

Separate Ruby script indicators (-/=) from their code with a single space.

Bad: no space between = and some_expression haml =some_expression

Good haml = some_expression

Good haml - some_value = 'Hello World'

Ensuring space after -/= enforces a consistency that all HAML tags/script indicators are separated from their inline content by a space. Since it is optional to add a space after -/= but required when writing %tag or similar, the consistency is best enforced via a linter.

Line is too long. [151/100]
Open

      = link_to 'https://www.digital.govt.nz/blog/global-coverage-of-our-legislation-as-code-work/', class: 'btn btn-primary btn-lg', role: 'button' do

HamlLint/LineLength

Option Description
max Maximum number of columns a single line can have. (default 80)

Wrap lines at 80 characters. You can configure this amount via the max option on the linter, e.g. by adding the following to your .haml-lint.yml:

linters:
  LineLength:
    max: 100

Long lines are harder to read and usually indicative of complexity. You can avoid them by splitting long attribute hashes on a comma, for example:

%tag{ attr1: 1,
      attr2: 2,
      attr3: 3 }

This significantly improves readability.

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

          %a{href: "https://choosealicense.com/licenses/agpl-3.0/", rel: "noopener", target: "_blank"} AGPL license.

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

The = symbol should have one space separating it from code
Open

      %p=t :referenced_explanation

HamlLint/SpaceBeforeScript

Separate Ruby script indicators (-/=) from their code with a single space.

Bad: no space between = and some_expression haml =some_expression

Good haml = some_expression

Good haml - some_value = 'Hello World'

Ensuring space after -/= enforces a consistency that all HAML tags/script indicators are separated from their inline content by a space. Since it is optional to add a space after -/= but required when writing %tag or similar, the consistency is best enforced via a linter.

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

          %a{href: "https://github.com/openfisca/openfisca-core"} source code

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

= "..." should be rewritten as ...
Open

          %b= "#{key.to_s.capitalize}: "

HamlLint/UnnecessaryStringOutput

Avoid outputting string expressions in Ruby when static text will suffice.

Bad haml %tag= "Some #{interpolated} string"

Good: more concise haml %tag Some #{interpolated} string

HAML gracefully handles string interpolation in static text, so you don't need to work with Ruby strings in order to use interpolation.

= "..." should be rewritten as ...
Open

          %span.count= "(#{facet_value.count})"

HamlLint/UnnecessaryStringOutput

Avoid outputting string expressions in Ruby when static text will suffice.

Bad haml %tag= "Some #{interpolated} string"

Good: more concise haml %tag Some #{interpolated} string

HAML gracefully handles string interpolation in static text, so you don't need to work with Ruby strings in order to use interpolation.

The = symbol should have one space separating it from code
Open

%span.badge.badge-secondary=variable.value_type.name
Severity: Info
Found in app/views/variables/_link.haml by haml-lint

HamlLint/SpaceBeforeScript

Separate Ruby script indicators (-/=) from their code with a single space.

Bad: no space between = and some_expression haml =some_expression

Good haml = some_expression

Good haml - some_value = 'Hello World'

Ensuring space after -/= enforces a consistency that all HAML tags/script indicators are separated from their inline content by a space. Since it is optional to add a space after -/= but required when writing %tag or similar, the consistency is best enforced via a linter.

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

      %li{class: v.value_type.name}

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

Line is too long. [116/100]
Open

          %a{href: "https://choosealicense.com/licenses/agpl-3.0/", rel: "noopener", target: "_blank"} AGPL license.

HamlLint/LineLength

Option Description
max Maximum number of columns a single line can have. (default 80)

Wrap lines at 80 characters. You can configure this amount via the max option on the linter, e.g. by adding the following to your .haml-lint.yml:

linters:
  LineLength:
    max: 100

Long lines are harder to read and usually indicative of complexity. You can avoid them by splitting long attribute hashes on a comma, for example:

%tag{ attr1: 1,
      attr2: 2,
      attr3: 3 }

This significantly improves readability.

Files should end with a trailing newline
Open

            - else

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)

Line is too long. [121/100]
Open

              = link_to 'More info on formulas', 'https://openfisca.org/doc/coding-the-legislation/10_basic_example.html'

HamlLint/LineLength

Option Description
max Maximum number of columns a single line can have. (default 80)

Wrap lines at 80 characters. You can configure this amount via the max option on the linter, e.g. by adding the following to your .haml-lint.yml:

linters:
  LineLength:
    max: 100

Long lines are harder to read and usually indicative of complexity. You can avoid them by splitting long attribute hashes on a comma, for example:

%tag{ attr1: 1,
      attr2: 2,
      attr3: 3 }

This significantly improves readability.

Style/UnneededCondition: Use double pipes || instead.
Open

    -if @variable.description

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

Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
Open

      %li.breadcrumb-item.active{"aria-current" => "page"}= @variable.name

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: "width=device-width, initial-scale=1, shrink-to-fit=no", name: "viewport"}/

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

            %a{href: "https://openfisca.org", rel: "noopener", target: "_blank", class: 'img'}

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

          %a{href: "https://choosealicense.com/licenses/agpl-3.0/", rel: "noopener", target: "_blank"} AGPL license.

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

Severity
Category
Status
Source
Language