Skip to content

Using a formatter or memory profile stops cache/parallelization from being used #11664

@broksonic21

Description

@broksonic21

Expected behavior

When you run

bundle exec rubocop --fail-level W --display-only-fail-level-offenses --cache true -d

the cache is used per the logs:

Use parallel by default.
Running parallel inspection
Loading cache from .rubocop-cache/rubocop_cache/REDACTED/REDACTED/REDACTED_FILE
Loading cache from .rubocop-cache/rubocop_cache/REDACTED/REDACTED/REDACTED_FILE

I expected running this

bundle exec rubocop --fail-level W --display-only-fail-level-offenses --cache true -d --format json
or
bundle exec rubocop --fail-level W --display-only-fail-level-offenses --cache true -d --format junit
or
bundle exec rubocop --fail-level W --display-only-fail-level-offenses --cache true -d --memory --profile

would do the same

Actual behavior

It doesn't however, you get no lines regarding cache or parallel, only scanning

Scanning /Users/REDACTED/REDACTED/app/Gemfile
Scanning /Users/REDACTED/REDACTED/app/Rakefile
Scanning /Users/REDACTED/REDACTED/REDACTED_PATH/REDACTED_FILE.rb
Scanning /Users/REDACTED/REDACTED/REDACTED_PATH/REDACTED_FILE.rb

Steps to reproduce the problem

See commands above

RuboCop version

1.47.0 (using Parser 3.2.1.0, rubocop-ast 1.27.0, running on ruby 2.7.7) [arm64-darwin21]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions