inherit_from: .rubocop_todo.yml require: - ./test/safe_navigation_cop.rb - rubocop-performance - rubocop-rails - rubocop-minitest - rubocop-capybara AllCops: Exclude: - config/initializers/forbidden_yaml.rb - app/helpers/dynamic_errors_helper.rb - !ruby/regexp /(vendor|bundle|bin|db|tmp|server)\/.*/ DisplayCopNames: true DisplayStyleGuide: true TargetRubyVersion: 3.2 NewCops: enable Rails: Enabled: true Rails/SkipsModelValidations: Enabled: false Rails/LexicallyScopedActionFilter: Enabled: false Rails/RefuteMethods: Enabled: false Rails/HelperInstanceVariable: Enabled: false Rails/FilePath: Enabled: false Rails/RakeEnvironment: Exclude: - lib/tasks/gen_erd.rake Rails/UnknownEnv: Environments: - production - development - staging - test Rails/UniqueValidationWithoutIndex: Enabled: false Rails/ActionControllerTestCase: Enabled: false # Causes every integration test to fail Layout/ArgumentAlignment: Enabled: false Metrics/AbcSize: Max: 42 # TODO: Lower to 15 Exclude: - test/functional/api/v1/owners_controller_test.rb Metrics/BlockLength: Exclude: - test/**/*.rb - lib/tasks/**/*.rake - lib/github_oauthable.rb - app/models/concerns/**/*.rb - config/routes.rb - config/environments/development.rb Metrics/ClassLength: Max: 356 # TODO: Lower to 100 Exclude: - test/**/* Metrics/CyclomaticComplexity: Max: 9 # TODO: Lower to 6 Layout/LineLength: Max: 150 Metrics/MethodLength: Max: 30 # TODO: Lower to 10 Metrics/ModuleLength: Exclude: - lib/patterns.rb - app/models/concerns/rubygem_searchable.rb - app/helpers/rubygems_helper.rb Metrics/PerceivedComplexity: Max: 10 # TODO: Lower to 7 Performance/RedundantMerge: Enabled: false Layout/ParameterAlignment: EnforcedStyle: with_fixed_indentation Layout/HashAlignment: Enabled: false Layout/EmptyLineAfterGuardClause: Enabled: false Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Layout/MultilineOperationIndentation: EnforcedStyle: indented Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Style/AndOr: Exclude: - app/controllers/internal/ping_controller.rb Naming/AccessorMethodName: Exclude: - app/controllers/application_controller.rb Style/CustomSafeNavigationCop: Exclude: - app/models/links.rb Style/Documentation: Enabled: false Style/FetchEnvVar: Enabled: false Style/StringLiterals: EnforcedStyle: double_quotes Exclude: - config/**/* Style/FrozenStringLiteralComment: Enabled: false Security/MarshalLoad: Enabled: false Style/EmptyMethod: EnforcedStyle: expanded Style/FormatStringToken: Enabled: false Style/HashEachMethods: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/ExplicitBlockArgument: Enabled: true Style/GlobalStdStream: Enabled: true Style/OptionalBooleanParameter: Enabled: true Style/SingleArgumentDig: Enabled: true Style/StringConcatenation: Enabled: true Lint/DuplicateElsifCondition: Enabled: true Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/BinaryOperatorWithIdenticalOperands: Enabled: true Lint/DuplicateRescueException: Enabled: true Lint/EmptyConditionalBody: Enabled: true Lint/FloatComparison: Enabled: true Lint/MissingSuper: Enabled: true Lint/OutOfRangeRegexpRef: Enabled: true Lint/SelfAssignment: Enabled: true Lint/TopLevelReturnWithArgument: Enabled: true Lint/UnreachableLoop: Enabled: true Performance/AncestorsInclude: Enabled: true Performance/BigDecimalWithNumericArgument: Enabled: true Performance/RedundantSortBlock: Enabled: true Performance/RedundantStringChars: Enabled: true Performance/ReverseFirst: Enabled: true Performance/SortReverse: Enabled: true Performance/Squeeze: Enabled: true Performance/StringInclude: Enabled: true Style/ExponentialNotation: Enabled: true Style/SlicingWithRange: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/RedundantFetchBlock: Enabled: true Style/AccessorGrouping: Enabled: true Style/ArrayCoercion: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/CaseLikeIf: Enabled: true Style/HashAsLastArrayItem: Enabled: true Style/HashLikeCase: Enabled: true Style/HashSyntax: EnforcedShorthandSyntax: either Style/RedundantAssignment: Enabled: true Style/RedundantFileExtensionInRequire: Enabled: true Minitest/MultipleAssertions: Enabled: false Style/ClassAndModuleChildren: EnforcedStyle: compact Exclude: - lib/gemcutter/middleware/hostess.rb - lib/gemcutter/middleware/redirector.rb