-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Fix report flags not reporting on subsequent runs when cache is used #5049
Comments
Thanks! It looks to be a longer-standing bug than a regression with 13.8.0. I've labelled the issue as ready to implement. If anyone has time to look into this then please consider contributing. |
I tested 13.7.0 and also has the issue. I can't go further behind because of the rule's renaming (well, I can but time 🙂) |
I'm revisiting this issue. Perhaps, here's a reproduction with 16.2.0:
export default {
rules: {
'block-no-empty': true,
},
};
a { color: red; } /* stylelint-disable-line block-no-empty */ $ npx stylelint -v
16.2.0
$ rm -f .stylelintcache
$ DEBUG=* npx stylelint "*.css" --rd --cache
stylelint:file-cache Cache file is created at /Users/masafumi.koba/git/stylelint/stylelint/tmp/.stylelintcache +0ms
stylelint:standalone Processing /Users/masafumi.koba/git/stylelint/stylelint/tmp/test.css +0ms
stylelint:standalone Linting complete in 69ms +16ms
test.css
1:19 ✖ Needless disable for "block-no-empty" --report-needless-disables
1 problem (1 error, 0 warnings)
$ DEBUG=* npx stylelint "*.css" --rd --cache
stylelint:file-cache Cache file is created at /Users/masafumi.koba/git/stylelint/stylelint/tmp/.stylelintcache +0ms
stylelint:standalone Processing /Users/masafumi.koba/git/stylelint/stylelint/tmp/test.css +0ms
stylelint:file-cache Skip linting /Users/masafumi.koba/git/stylelint/stylelint/tmp/test.css. File hasn't changed. +33ms
stylelint:standalone Linting complete in 59ms +7ms Deleting cache doesn't seem to work when Lines 219 to 225 in eebb786
|
I found a problem in the code. I'll open a pull request soon. |
When using the
--rd
switch, if there is a needless disable, the second or any subsequent run doesn't report it.None
Probably doesn't matter:
13.7.2 and 13.8.0
CLI:
stylelint "**/*.{css,scss}" --cache --cache-location .cache/.stylelintcache --rd
Probably not
Any needless disables should be reported on subsequent runs.
No needless disables were reported. If I delete the cache or remove the
--cache
CLI flag, then the needless disables are reported.@jeddy3 I verified this and indeed happens with 13.7.0, 13.7.2 and 13.8.0 that I could quickly test.
The text was updated successfully, but these errors were encountered: