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
Add an option to redirect offence reports to stderr #9043
Conversation
I get the rationale, but won't this break the existing editor plugins? |
Yeah my concern is editors that you can’t just update by pulling a repo are going to be broken until they can be updated (like rubymine). |
An easiest fix is to add https://docs.rubocop.org/rubocop/integration_with_other_tools.html |
Would it better to keep the behavior and add a new option, like |
I think so. Might also be a good idea to invite some of the plugin authors to share their perspective on this. |
OK, I changed so. A new option |
f93478d
to
9de49cf
Compare
Thanks for changing this to be an option. That'll make things a lot easier for those of us that parse rubocop output in editor plugins / other tools |
0bbe428
to
3d6038f
Compare
I think you should add some section to the docs explaining the use-case for this option, otherwise I doubt people will make use of it. |
This makes it easier to use --stdin in shell scripts, editor integration, CI workflow, etc. by eliminating the need to process the output.
3d6038f
to
cae74cb
Compare
I updated the description of this option mentioning it is useful when combined with |
Thanks! |
This adds
--stderr
to make it easier to use--stdin
in shell scripts, editor integration, CI workflow, etc.In response to feedbacks, I altered this PR from changing the behavior of
--stdin
to adding a new option.Here's the original description.
This makes editor integration much easier to implement by eliminating the need to process the output.In the short term, existing editor plugins that expect
====================
will be broken, but it should be relatively easy to fix.For example, vscode-ruby-rubocop can check if stderr output contains (or ends with)
====================
to see if it needs to delete warnings from stdout output. (to support any version of rubocop)Eventually, they just need to simply use the stdout output.
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.