-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Consider printing violations to stderr and informational logs to stdout #386
Comments
This discussion begs the question of what the output of The informational logs like Finally, errors like I think this scheme allows for the best selective logging and redirection. Just my $0.02. |
Although, I understand this would be a pretty big upgrade to the logging functionality as it exists now, though I'd imagine we could find a suitable library. |
The first part makes sense to me, but I'm still not convinced that the informational logs should go in Rubocop handles this by allowing lint output to be piped to a file (its |
Hmm. I can see both sides to that. I'm primarily thinking about my two use cases.
In both of these cases, I'm a fan of keeping informational logging out of |
I don't think the informational log provide value at the moment. They just repeat the internal process of the tool, which is an implementation detail anyway. It's very repetitive, makes the output unreadable (or unscannable at the least) for humans and not pipeable without redirection. I agree with @scottrhoyt that default I've started working on a new reporter that makes the output a bit more human readable. The output is debatable but, looking at jshint and other similar programs, it's usually something like: file[n] line, col, warning file[n1] line, col, warning file[n*] line, col, warning For now a reporter like this will only be useful when |
Thanks for the useful feedback, @klaaspieter! I personally think the With that in mind, I think we could evaluate either a |
My thoughts:
👍 |
Re my comment about a custom reporter. The following does what I want for now:
It would be nice if the files were separated by newlines, but I'm unsure whether that warrants a custom reporter or not. Either way the |
Sounds like the we should continue with the current process and potentially add a |
Yeah, my preference is a |
A |
We currently do the opposite. I just opted to do the same as rubocop, which made sense to me since the main output of a linter _are_ the errors themselves, but I don’t feel strongly about it.
I bring this up because when asked about what someone didn't like about SwiftLint, they replied "It prints junk to stderr for no reason".
@keith brought this up once before in #152 (comment).
The text was updated successfully, but these errors were encountered: