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

Format lint messages like a C compiler #5274

Closed
rdiez opened this issue May 6, 2021 · 2 comments
Closed

Format lint messages like a C compiler #5274

rdiez opened this issue May 6, 2021 · 2 comments

Comments

@rdiez
Copy link
Contributor

rdiez commented May 6, 2021

I am a newcomer and I was surprised at the lint message formatting:

SomeFile1.html
1:23 ✖ Some warning
2:34 ✖ Something else

SomeFile2.html
4:56 ✖ Some other warning

That is hard to parse (for a machine). I guess that most IDEs, like Atom, will have their own plug-in that understands that format. Or maybe there is way to generate that information as a JSON file or whatever.

But wouldn't it be easier to (optionally) generate such messages like a C compiler does?

/home/user/some/file.cpp:123:45: error: some error here

This way, my Emacs would recognise those warnings and automatically hyperlink them.

Emacs is rather flexible about the message formatting, see compilation-error-regexp-alist . But I do not think that this option can adapt to stylelint, because the filename is separate from the warning messages.

@ybiquitous
Copy link
Member

@rdiez Could you try -f unix flag, please?

https://stylelint.io/user-guide/usage/options#formatter

@rdiez
Copy link
Contributor Author

rdiez commented May 6, 2021

Thanks, I'm sorry I missed that option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants