require: - rubocop-performance AllCops: TargetRubyVersion: 3.2 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true Exclude: - "**/vendor/**/*" - "**/*_pb.rb" # Prefer &&/|| over and/or. Style/AndOr: Enabled: true Layout: Enabled: false # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. Style/HashSyntax: Enabled: true Style/DefWithParentheses: Enabled: true # Defining a method with parameters needs parentheses. Style/MethodDefParentheses: Enabled: true Style/FrozenStringLiteralComment: Enabled: true EnforcedStyle: always Layout/EmptyLineAfterMagicComment: Enabled: true Style/RedundantFreeze: Enabled: true # Use quotes for string literals when they are enough. Style/RedundantPercentQ: Enabled: true Style/StringLiterals: Enabled: false Lint/AmbiguousOperator: Enabled: true Lint/AmbiguousRegexpLiteral: Enabled: true Lint/ErbNewArguments: Enabled: true # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. Lint/RequireParentheses: Enabled: true Lint/ShadowingOuterLocalVariable: Enabled: true Lint/RedundantStringCoercion: Enabled: true Lint/UriEscapeUnescape: Enabled: true Lint/UselessAssignment: Enabled: true Lint/DeprecatedClassMethods: Enabled: true Style/ParenthesesAroundCondition: Enabled: true Style/RedundantBegin: Enabled: false Style/RedundantReturn: Enabled: true AllowMultipleReturnValues: true Style/Semicolon: Enabled: true AllowAsExpressionSeparator: true # Prefer Foo.method over Foo::method Style/ColonMethodCall: Enabled: true Style/TrivialAccessors: Enabled: true Performance/FlatMap: Enabled: true Performance/RedundantMerge: Enabled: true Performance/StartWith: Enabled: true Performance/EndWith: Enabled: true Performance/RegexpMatch: Enabled: true Performance/ReverseEach: Enabled: true Performance/UnfreezeString: Enabled: true