rubocop / guard-rubocop

Guard plugin for RuboCop
MIT License
262 stars 55 forks source link

Use --parallel option of rubocop #37

Closed edvakf closed 6 years ago

edvakf commented 6 years ago

The option was apparently introduced in RuboCop 0.49 in this May.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 97.059% when pulling b9e1987da04ad846fe5a2468f2715c1a0b5b8a76 on edvakf:parallel into 99fa9ae1d4201416eb91c5099449087a24c5a7ad on yujinakayama:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 97.059% when pulling b9e1987da04ad846fe5a2468f2715c1a0b5b8a76 on edvakf:parallel into 99fa9ae1d4201416eb91c5099449087a24c5a7ad on yujinakayama:master.

edvakf commented 6 years ago

Oops, I'll fix this soon.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 97.059% when pulling b1f707f9e4d5a488c9f412f1977c5995c7e37eba on edvakf:parallel into 99fa9ae1d4201416eb91c5099449087a24c5a7ad on yujinakayama:master.

edvakf commented 6 years ago
    rescue => error
    ^^^^^^
lib/guard/rubocop/runner.rb:7:5: C: Class has too many lines. [104/103]
    class Runner ...
    ^^^^^^^^^^^^
spec/guard/rubocop/runner_spec.rb:334:1: C: Use meaningful heredoc delimiters.
      END
^^^^^^^^^
spec/guard/rubocop/runner_spec.rb:500:1: C: Use meaningful heredoc delimiters.
        END
^^^^^^^^^^^
13 files inspected, 4 offenses detected
RuboCop failed!

Hmm, these are not related to my changes. What should we do?

yujinakayama commented 6 years ago

I'm on the fence about this.

Using the --parallel option by default means that we need to change the RuboCop dependency to ~> 0.49. That's something considered a breaking change in SemVer. Since people tend to lock RuboCop version in their repository, I guess there're still many users using RuboCop 0.49-.

edvakf commented 6 years ago

I see. Actually I have realized that this behavior can be achieved by passing --parallel to the cli parameter.

  guard :rubocop, all_on_start: false, cli: ['--format', 'clang', '--rails', '--parallel'] do

I'm closing this issue. It may be helpful to write it on README.