htmlhint / htmlhint/HTMLHint

Inline rule apply to other files

Open
#534 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

keep-unstale
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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.