--- inherit_from: .rubocop_todo.yml Layout/LineLength: Max: 120 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Lint/UnusedMethodArgument: AllowUnusedKeywordArguments: true # https://stackoverflow.com/questions/40934345/rubocop-25-line-block-size-and-rspec-tests Metrics/BlockLength: # Exclude DSLs Exclude: - 'Rakefile' - '*.gemspec' - '**/*.rake' - 'spec/**/*.rb' - 'feature/**/*.rb' # I use keyword arguments for a poor man's dependency injection to cut # down on the magic in my tests. Metrics/ParameterLists: CountKeywordArgs: false Naming/HeredocDelimiterNaming: Enabled: false Naming/MethodParameterName: Enabled: true AllowedNames: # I don't think things on this list are a terribly hard convention # for folks to learn. bbatsov also doesn't care much for this # check: # # https://github.com/rubocop-hq/rubocop/issues/3666 - e # exception - x # cartesian coordinates - y # cartesian coordinates # by default (EnforcedStyle=NormalCase) this rule doesn't like # things like check_1, check_2, etc and wants check1, check2, etc. I # like the former. # # https://docs.rubocop.org/rubocop/cops_naming.html#namingvariablenumber Naming/VariableNumber: Enabled: true EnforcedStyle: snake_case # http://www.betterspecs.org/#single # # > in tests that are not isolated (e.g. ones that integrate with a # > DB, an external webservice, or end-to-end-tests), you take a # > massive performance hit to do the same setup over and over again, # > just to set a different expectation in each test. In these sorts # > of slower tests, I think it's fine to specify more than one # > isolated behavior. RSpec/MultipleExpectations: Exclude: - 'feature/**/*.rb' # # Add 'XX X' to the standard list # Style/CommentAnnotation: Keywords: - "TOD\ O" - "FIXM\ E" - "OPTIMIZ\ E" - "HAC\ K" - "REVIE\ W" - "XX\ X" Style/StringLiterals: EnforcedStyle: single_quotes SupportedStyles: - single_quotes - double_quotes ConsistentQuotesInMultiline: true # I like trailing commas in arrays and hashes. They let me insert new # elements and see them as one line in a diff, not two. Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma # If I'm using one function name and returning the contents of an # attribute, that's OK. The alternative would be this, which I find # confusing and often not really what I mean: # # attr_reader :something_else # alias_method :something, :something_else Style/TrivialAccessors: ExactNameMatch: true AllCops: NewCops: enable TargetRubyVersion: 2.6 Exclude: - 'bin/*' - 'feature/samples/**/*' - 'vendor/**/*' require: - rubocop-rake - rubocop-rspec