-
-
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 unexpected error message in report()
#7172
Comments
@georges-g Thanks again for the helpful report. I'm afraid that this also may be a bug of > require('postcss-scss').parse('').source
{
input: Input {
css: '',
hasBOM: false,
id: '<input css zG44F1>',
[Symbol(fromOffsetCache)]: [ 0 ]
},
start: { column: 1, line: 1, offset: 0 },
end: { column: 1, line: 1, offset: 0 }
}
> require('postcss-sass').parse('').source
{
start: [ 0, 0 ],
end: [ 0, 0 ],
input: Input { css: '', hasBOM: false, id: '<input css Ef1dZl>' }
} We can see the difference between the |
@ybiquitous Thanks again for the useful reply. I created an issue there. There is still the issue of stylelint logging and the difficulty to identify which file made it crash. Should we discuss it here or do I create another issue/feature request? |
Please feel free to open a Pull Request to improve the message. 👌🏼 |
report()
OK, I put this in my todo list, but anyone should feel free to take it. It's a pretty big project and it will take me some time to get to know the fundamentals of its codebase and contribute appropriately. |
For example, does the following message satisfy your request?
If so, we can easily change the error message raised in |
That would be useful yes. If you want to go deeper, I think you need several things:
Then you will probably not need to customize every |
Honestly, such a big change is unneeded with this issue. In addition, since we're mainly developing on the |
It might not be so needed for this specific issue, but it could be useful if you look at the bigger picture and consider various debugging issues. IMO, you could leave this issue open for a while and see what other people think. It could wait for after v16 is released. If you don't want that, you can go for the quickfix, up to you. |
What minimal example or steps are needed to reproduce the bug?
Empty sass file
What minimal configuration is needed to reproduce the bug?
How did you run Stylelint?
npx stylelint -f verbose "**/*.sass"
Which Stylelint-related dependencies are you using?
What did you expect to happen?
No problem to report
What actually happened?
Stylelint crashed:
Do you have a proposal to fix the bug?
Stylelint fails to process an empty sass file.
Again, I am not sure if it comes from stylelint or postcss-sass plugin. It works properly with the
postcss-scss
plugin though.Also, the error message is not very practical, it does not even specify which file made stylelint crash, even with the
-f verbose
option. Any way to improve debugging messages?The text was updated successfully, but these errors were encountered: