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

Use RuboCop::CLI::Command::ExecuteRunner #270

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

nicksieger
Copy link
Contributor

Preserves RuboCop exit status while using RuboCop logic for printing summary, either on stdout or stderr with --stdin ... --stderr options.

I ran into this issue while running a command like cat file.rb | standardrb --no-color --stderr --fix --stdin file.rb. I want the reformatted code on stdout with the warnings and summary on stderr. I don't know if the use of Rubocop::Runner was intentional, but using the execute runner works for my case.

Preserves RuboCop exit status while using RuboCop logic for printing
summary, either on stdout or stderr with `--stderr` option.
@searls
Copy link
Contributor

searls commented Mar 5, 2021

Great PR, @nicksieger! This looks great. As for:

I don't know if the use of Rubocop::Runner was intentional, but using the execute runner works for my case.

I wish I knew, too! It's been so long I really can't recall, and it seems to work the same locally, elsewise. Thank you!

@searls searls merged commit 341604d into standardrb:master Mar 5, 2021
@searls
Copy link
Contributor

searls commented Mar 5, 2021

Landed in 1.0.2

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

Successfully merging this pull request may close these issues.

2 participants