mbj / devtools

The rake ci task!
MIT License
64 stars 20 forks source link

Upgrade flay, reek, rubocop, and mutant #124

Closed backus closed 8 years ago

backus commented 8 years ago

@mbj it looks like the final commit in this PR fails simply because rubocop's defaults have changed. I'll let you make the judgement call here on what you prefer

mbj commented 8 years ago

rubocop you are drunk:

lib/devtools.rb:33:29: C: Freezing immutable objects is pointless.
  UNIT_TEST_PATH_REGEXP   = %r{\bspec/unit/}.freeze

Unless the regexp instance is frozen you could still patch the eigenclass...

mbj commented 8 years ago

@mbj it looks like the final commit in this PR fails simply because rubocop's defaults have changed. I'll let you make the judgement call here on what you prefer

@backus All of the flags are invalid, you can disable them.

mbj commented 8 years ago
lib/devtools/project.rb:62:19: C: Operator = should be surrounded by a single space.
      @spec_root  = root.join(SPEC_DIRECTORY_NAME)

Is part of an aligned assignment.

mbj commented 8 years ago
shared/spec/shared/idempotent_method_behavior.rb:4:5: C: Always use raise to signal exceptions.
    fail 'RSpec not configured for threadsafety' unless RSpec.configuration.threadsafe?
    ^^^^

I use a different convention in my projects.

backus commented 8 years ago

:thumbsup:

backus commented 8 years ago

@mbj I think that the Style/SpaceAroundOperators flag is valid. It intentionally does not flag extra spacing when used to align with other operators. Note that it doesn't flag anything in lib/devtools.rb. The flag here

lib/devtools/project.rb:62:19: C: Operator = should be surrounded by a single space.
      @spec_root  = root.join(SPEC_DIRECTORY_NAME)

is valid I think because there are no other operators above or below that are being aligned with.

mbj commented 8 years ago

is valid I think because there are no other operators above or below that are being aligned with.

Ahh, I assumed there is alignment with other assignments, as rubocop bitched about that, nice they fixed this.