Skip to content

Linter CLI: Upgrading fails to disable new rules that report offenses #1578

@tomhughes

Description

@tomhughes

I run upgrade and it enabled 11 new rules with no offenses found:

% bundle exec bin/yarn run herb-lint --upgrade
yarn run v1.22.22
$ /home/tom/src/osm/rails/node_modules/.bin/herb-lint --upgrade

↻ Checking 11 new rules against your codebase...

✓ Updated .herb.yml version from 0.9.2 to 0.9.4

✓ Enabled 11 new rules (no offenses found):

  ✓ actionview-no-unnecessary-tag-attributes
  ✓ actionview-no-void-element-content
  ✓ actionview-strict-locals-partial-only
  ✓ erb-no-debug-output
  ✓ erb-no-unused-expressions
  ✓ erb-no-unused-literals
  ✓ erb-prefer-direct-output
  ✓ html-no-unescaped-entities
  ✓ html-no-unknown-tag
  ✓ html-require-script-nonce
  ✓ source-indentation

Done in 1.47s.

Then I ran lint and it found 53 offenses from 5 of those 11 rules:

% bundle exec bin/yarn run herb-lint --fix    
yarn run v1.22.22
$ /home/tom/src/osm/rails/node_modules/.bin/herb-lint --fix
✓ Using Herb config file at /home/tom/src/osm/rails/.herb.yml
...
 Summary:
  Checked      241 files
  Files        51 with offenses | 190 clean (241 total)
  Offenses     53 errors | 2 warnings | 1 ignored (55 offenses across 51 files)
  Fixable      55 offenses | 1 autocorrectable using `--fix`
  Rules        85 enabled | 7 not enabled | 1 disabled
  Start at     08:10:44
  Duration     1512ms
error Command failed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinter

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions