require: - rubocop-rspec - rubocop-rake - rubocop-performance AllCops: # We bump the version to get new cops, so enable them by default NewCops: enable # Two lines should fit next to each other in split view on a widescreen Layout/LineLength: Max: 120 # We still have old-style rspec checks, so this triggers on functional comparisons there Lint/Void: Exclude: - 'spec/**/*_spec.rb' # RSpec has a lot of blocks, so ignore this rule there Metrics/BlockLength: Severity: info Exclude: - 'spec/**/*_spec.rb' # I prefer to see the class name over "described_class" RSpec/DescribedClass: EnforcedStyle: explicit # I prefer groups for structure, so the defaults are a little too strict for me RSpec/NestedGroups: Severity: info Max: 4 # I prefer more verbose examples, so tend to use more lines than the defaults RSpec/ExampleLength: Severity: info Max: 20 # For strings I enjoy using %w[], but for symbols the %i[] syntax just does not click. Style/SymbolArray: EnforcedStyle: brackets # Indentation is something I've got strong opinions about which differ from Rubocop. Layout/ArgumentAlignment: EnforcedStyle: with_fixed_indentation # default is with_first_argument Layout/ArrayAlignment: EnforcedStyle: with_fixed_indentation # default is with_first_element Layout/FirstArgumentIndentation: EnforcedStyle: consistent # default is special_for_inner_method_call_in_parentheses Layout/FirstArrayElementIndentation: EnforcedStyle: consistent # default is special_inside_parentheses Layout/FirstHashElementIndentation: EnforcedStyle: consistent # default is special_inside_parentheses # Let's enforce this to be consistent Layout/EndOfLine: EnforcedStyle: lf # \n (unix line end) enforced everywhere, default is native