inherit_from: .rubocop_todo.yml require: - rubocop-rspec - rubocop-performance AllCops: Exclude: - 'samples/**/*' - 'tmp/**/*' - 'vendor/**/*' TargetRubyVersion: 2.4 # Tables are nice Layout/HashAlignment: EnforcedColonStyle: table EnforcedHashRocketStyle: table EnforcedLastArgumentHashStyle: ignore_implicit # Place . on the previous line Layout/DotPosition: EnforcedStyle: trailing # Require empty lines between defs, except for one-line defs Layout/EmptyLineBetweenDefs: AllowAdjacentOneLineDefs: true # Be rather lenient with line length Layout/LineLength: Max: 120 # Always put the closing brace on the last line Layout/MultilineMethodCallBraceLayout: EnforcedStyle: same_line # Indent one level for follow-up lines Layout/MultilineMethodCallIndentation: EnforcedStyle: indented # Indent one level for follow-up lines Layout/MultilineOperationIndentation: EnforcedStyle: indented # Assume the programmer knows how bracketed block syntax works Lint/AmbiguousBlockAssociation: Enabled: false # Some of our source examples include interpolation explicitely. Lint/InterpolationCheck: Exclude: - 'spec/**/*' # We use :true and :false as AST node types. Lint/BooleanSymbol: Enabled: false # Spec blocks can be any size Metrics/BlockLength: Exclude: - 'spec/**/*' # Keyword arguments make long parameter lists readable Metrics/ParameterLists: CountKeywordArgs: false Naming/RescuedExceptionsVariableName: PreferredName: error # These files do not test classes or modules RSpec/DescribeClass: Exclude: - 'spec/quality/*_spec.rb' - 'spec/performance/reek/smell_detectors/runtime_speed_spec.rb' # Our examples are large because we have source literals in them RSpec/ExampleLength: Enabled: false # rubocop-rspec expects a CodeClimate namespace to go with the code_climate directory. RSpec/FilePath: Exclude: - 'spec/reek/report/code_climate/code_climate_configuration_spec.rb' - 'spec/reek/report/code_climate/code_climate_fingerprint_spec.rb' - 'spec/reek/report/code_climate/code_climate_formatter_spec.rb' - 'spec/reek/report/code_climate/code_climate_report_spec.rb' # Allow and/or for control flow only Style/AndOr: EnforcedStyle: conditionals # Require comment for files in lib and bin Style/FrozenStringLiteralComment: Include: - 'bin/*' - 'lib/**/*' EnforcedStyle: always # Allow multiline block chains Style/MultilineBlockChain: Enabled: false # There's nothing wrong with parallel assignment Style/ParallelAssignment: Enabled: false Style/PercentLiteralDelimiters: PreferredDelimiters: default: () '%W': () '%I': () '%w': () '%i': () # Allow Perl-style references to regex matches Style/PerlBackrefs: Enabled: false # Allow single-line method definitions Style/SingleLineMethods: Enabled: false # Prefer symbols to look like symbols Style/SymbolArray: EnforcedStyle: brackets # Allow small arrays of words with quotes Style/WordArray: MinSize: 4 Metrics/ClassLength: Exclude: - 'lib/reek/cli/options.rb' # Activate new cops from RuboCop 0.80 - 0.83 Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Style/ExponentialNotation: Enabled: true Style/HashEachMethods: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/SlicingWithRange: Enabled: true