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

Allow negation ! for --ignore #1339

Open
woodconn opened this issue Jun 9, 2023 · 3 comments
Open

Allow negation ! for --ignore #1339

woodconn opened this issue Jun 9, 2023 · 3 comments
Labels
keep-unstale The issue will not be marked as stale by the stale-bot

Comments

@woodconn
Copy link

woodconn commented Jun 9, 2023

Your documentation shows how ignore can handle multiple file paths
https://github.com/htmlhint/HTMLHint/blob/master/docs/user-guide/usage/options.md

However the negation command '!' is currently useless.

This means if I only want to search in a folder, I can't use

!**/GoodFolder/**

Instead I must manually ignore all other folders.

**/BadFolder1/**,......,**/BadFolder8889986767/**

I'd also be ok if you allowed a new rule that would filter paths that could be modified in .htmlhintrc

@woodconn
Copy link
Author

woodconn commented Jun 9, 2023

Workaround, I found this to work as expected, however I don't know if I can feed it multiple paths like ignore is capable of:
Run npx htmlhint "**/GoodFolder/**/*.razor"

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the bot:stale Issue marked as stale because there was no activity label Aug 12, 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
@hyperupcall
Copy link
Contributor

The glob package mentions that negation was removed in v6. HTMLHint currently uses glob v8.

globby supportgs negation, but I am not convinced it is worth switching. The user can supply multiple glob patterns as regular arguments to htmlhint. Furthermore, @babel/cli, npm, mocha, tslint, browserify, grunt, styelus, nyc, karma, etc. all use glob, so I think the user experience could be improved without changing how --ignored globs are parsed

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

3 participants