--- Gemspec/RequireMFA: # We publish via CI/CD, so MFA is not possible. Enabled: false Layout/LineLength: Max: 120 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Lint/EmptyClass: # some workarounds for circular dependencies require empty classes AllowComments: true 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 # Can try removing this after I have a release installed with this # fix (probably in rubocop-minitest 0.10.3): # # https://github.com/rubocop-hq/rubocop-minitest/pull/116 Minitest/TestMethodName: Enabled: 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 # # 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 # Solargraph needs to see a class inherited from Struct to recognize # what's going on Style/StructInheritance: Enabled: false # 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: 3.0 Exclude: - 'bin/*' - 'vendor/**/*' require: - rubocop-rake - rubocop-minitest