Growstuff/growstuff

View on GitHub
app/views/plantings/_timeline.html.haml

Summary

Maintainability
Test Coverage

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

        .badge.badge-info.badge-harvesting{id: "month-#{month}"}

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 end with one space before the closing brace
Open

        .badge.text-muted{'aria-hidden': "true", id: "month-#{month}"}

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

        .badge.badge-info.badge-harvesting{id: "month-#{month}"}

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 end with one space before the closing brace
Open

      .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}

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. [224/120]
Open

        %li{class: planting.planted_at + week_number.weeks > Time.zone.today ? 'text-muted progress-fade' : '', 'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: I18n.l(planting.planted_at + week_number.weeks)}

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.

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

        %li{class: planting.planted_at + week_number.weeks > Time.zone.today ? 'text-muted progress-fade' : '', 'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: I18n.l(planting.planted_at + week_number.weeks)}

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

        .badge.text-muted{'aria-hidden': "true", id: "month-#{month}"}

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. [183/120]
Open

      .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}

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.

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

      .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}

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 end with one space before the closing brace
Open

        %li{class: planting.planted_at + week_number.weeks > Time.zone.today ? 'text-muted progress-fade' : '', 'data-bs-toggle': "tooltip", 'data-bs-placement': "top", title: I18n.l(planting.planted_at + week_number.weeks)}

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

Do not use inline style attributes
Open

      .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}

HamlLint/InlineStyles

Tags should not contain inline style attributes.

Bad haml %p{ style: 'color: red;' }

Good haml %p.warning

Exceptions may need to be made for dynamic content and email templates.

See CodeAcademy to learn more.

There are no issues that match your filters.

Category
Status