Inline rule apply to other files
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 474
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
Describe the bug
Execute htmlhint cli sometimes happenes false negative when some file uses inline rules.
I saw that HTMLHint.verify(content, ruleset) changes ruleset's value.
To Reproduce
Steps to reproduce the behavior:
- Execute
npx htmlhint **/*.html- Need multiple files. One of file uses inline rules, other files don't use inline rules.
There are reproducer: https://github.com/maruTA-bis5/htmlhint-inline-rules-breaks-cli
Expected behavior
Inline rules should not apply to other files.
Additional context
HTMLHint version: 0.14.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HTMLHint.verify(content, ruleset) entry point and reproduce the issue with npx htmlhint **/*.html using multiple files, including one with inline rules. Trace when the ruleset changes between files; done means inline rules from one file no longer affect other files and the reproducer no longer reports a false negative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100