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

Make RuboCop runner composable and capture any stdout message from it #275

Closed
wants to merge 3 commits into from

Commits on Aug 31, 2022

  1. Make RuboCop runner composable instead of inheritance

    The current implementation of running RuboCop tasks is not composable.
    Instead, we use inheritance to obtain and use the functionality of the
    `RuboCop::Runner` class, which ends up coupling our interfaces too
    tightly to that class.
    
    Instead, this commit creates a `RuboCopRunner` class that is meant to
    encapsulate the functionality of the `RuboCop::Runner` class. Both the
    formatter and the diagnostic request classes are refactored to use this
    new class in a composable way, and the implementations are much nicer as
    a result.
    
    This new architecture also allows us to add common functionality to how
    RuboCop runs are made.
    paracycle committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    248db71 View commit details
    Browse the repository at this point in the history
  2. Start capturing all output during all RuboCop runs

    Moreover, set `$VERBOSE` to `nil` so that we don't end up seeing messages
    from `Kernel#warn` in the VSCode code Output pane as well.
    paracycle committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    26b787f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d604ef0 View commit details
    Browse the repository at this point in the history