houndci / hound

Automated code review for GitHub pull requests.
https://houndci.com
MIT License
1.95k stars 402 forks source link

Issues attempting to use Rubocop 0.80.0 #1780

Closed bruschill closed 4 years ago

bruschill commented 4 years ago

I'm getting the following from Hound after upgrading to 0.80.0:

image

Here's our .hound.yml:

rubocop:
  version: 0.80.0
  config_file: .rubocop.yml

haml:
  config_file: config/hound/haml.yml

coffee_script:
  enabled: true
  config_file: config/hound/coffeelint.json

eslint:
  enabled: true
  config_file: config/hound/javascript.json

scss:
  enabled: true
  config_file: config/hound/scss.yml

Here's our .rubocop.yml:

# Documentation: https://docs.rubocop.org/en/stable/

# ALL
AllCops:
  TargetRubyVersion: 2.6
  Exclude:
    - "db/schema.rb"
    - 'gems/rules_integration/**/db/**/*'
    - 'tmp/**/*'
    - 'vendor/**/*'

# LAYOUT
Layout/LineLength:
  Max: 100
  IgnoredPatterns:
    - "^\\s*test\\s+['\"].*['\"]\\s+do\\s*"
  Exclude:
    - 'Gemfile'
Layout/MultilineMethodCallIndentation:
  EnforcedStyle: indented
Layout/MultilineOperationIndentation:
  EnforcedStyle: indented
Layout/SpaceBeforeFirstArg:
  Exclude:
    - db/migrate/*.rb

# LINT
Lint/AssignmentInCondition:
  Enabled: false
Lint/LiteralAsCondition:
  Enabled: false
Lint/LiteralInInterpolation:
  Enabled: false

# Metrics
Metrics/AbcSize:
  Enabled: false
Metrics/ClassLength:
  Enabled: false
Metrics/CyclomaticComplexity:
  Enabled: false
Metrics/MethodLength:
  Enabled: false
Metrics/ModuleLength:
  Enabled: false
Metrics/ParameterLists:
  Enabled: false
Metrics/PerceivedComplexity:
  Enabled: false

# Naming
Naming/AccessorMethodName:
  Enabled: false
Naming/FileName:
  Enabled: false

# Style
Style/Alias:
  Enabled: false
Style/ClassAndModuleChildren:
  Enabled: false
Style/CollectionMethods:
  Enabled: true
  PreferredMethods:
    find: detect
    find_all: select
    reduce: inject
Style/Documentation:
  Enabled: false
Style/DoubleNegation:
  Enabled: false
Style/EachWithObject:
  Enabled: false
Style/EmptyLiteral:
  Enabled: false
Style/EmptyMethod:
  EnforcedStyle: expanded
Style/FrozenStringLiteralComment:
  Exclude:
    - "gems/rules_integration/Gemfile"
Style/GuardClause:
  Enabled: false
Style/HashEachMethods:
  Enabled: true
Style/HashTransformKeys:
  Enabled: true
Style/HashTransformValues:
  Enabled: true
Style/IfUnlessModifier:
  Enabled: false
Style/ModuleFunction:
  Enabled: false
Style/OneLineConditional:
  Enabled: false
Style/PercentLiteralDelimiters:
  Enabled: false
Style/PerlBackrefs:
  Enabled: false
Style/RaiseArgs:
  Enabled: false
Style/SignalException:
  Enabled: false
Style/SingleLineMethods:
  Enabled: false
Style/SpecialGlobalVars:
  Enabled: false
Style/StringLiterals:
  EnforcedStyle: single_quotes
Style/TrailingCommaInArguments:
  Enabled: false
Style/TrailingCommaInArrayLiteral:
  Enabled: false
Style/TrailingCommaInHashLiteral:
  Enabled: false
Style/VariableInterpolation:
  Enabled: false
Style/WhenThen:
  Enabled: false

As you can see, we've not defined Lint/HandleExceptions nor Naming/PredicateName.

Any thoughts as to what the issue is?

gylaz commented 4 years ago

Do you have org-wide configuration enabled? Can it be that the org-wide config defines Lint/HandleExceptions?

bruschill commented 4 years ago

Ah, that was it! Thanks!