Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the location of the parsed file in the start-event #1317

Open
commodis opened this issue Apr 25, 2023 · 0 comments
Open

Adding the location of the parsed file in the start-event #1317

commodis opened this issue Apr 25, 2023 · 0 comments
Labels
keep-unstale The issue will not be marked as stale by the stale-bot

Comments

@commodis
Copy link

commodis commented Apr 25, 2023

Is your feature request related to a problem? Please describe.

Introducing HTMLHint to legacy code is quite tricky. You can either disable all failing rules or ignore the file for all HTMLHint rules.
It is impossible to implement a ratcheting system where I can prevent new commits from having faults while systematically ignoring the existing faults.

This is especially the case for custom rules, where very specific problems can be detected at a very late stage and require huge amounts of labor to fix.

Describe the solution you'd like

There must be some way to retrieve the currently parsed source code location.
With that one can add an ignored source code location list to each of the rules and ignore the specific pages.

Currently the start-event looks like this:

{
  pos: 0,
  line: 1,
  col: 1,
  type: 'start'
}

Adding the source code location would allow that implementation:

{
  pos: 0,
  line: 1,
  col: 1,
  type: 'start',
  url: '/home/text.html'
}

Describe alternatives you've considered

I tried checking every event if they contain such information but nothing was found.
I am unaware of any Node.js specific function or object to retrieve that information,
which file HTMLHint is currently working on.

@stale stale bot added the bot:stale Issue marked as stale because there was no activity label Aug 12, 2023
@htmlhint htmlhint deleted a comment from stale bot Aug 14, 2023
@coliff coliff added keep-unstale The issue will not be marked as stale by the stale-bot and removed bot:stale Issue marked as stale because there was no activity labels Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-unstale The issue will not be marked as stale by the stale-bot
Projects
None yet
Development

No branches or pull requests

2 participants