inherit_from: - .custom_simplycop.yml - .simplycop_security.yml - .simplycop_metaprogramming.yml AllCops: Exclude: - 'db/schema.rb' - 'vendor/**/*' # Cop names are not displayed in offense messages by default. Change behavior # by overriding DisplayCopNames, or by giving the -D/--display-cop-names # option. DisplayCopNames: true # Style guide URLs are not displayed in offense messages by default. Change # behavior by overriding DisplayStyleGuide, or by giving the # -S/--display-style-guide option. DisplayStyleGuide: true UseCache: true MaxFilesInCache: 5000 ExtraDetails: true # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown Bundler/DuplicatedGem: Enabled: true Bundler/GemComment: Enabled: false Bundler/GemFilename: Enabled: true # To discuss: Suggest true but 103 fails on Chopin, 10 on Rater # Bundler/GemVersion: # Enabled: true Bundler/InsecureProtocolSource: Enabled: true Bundler/OrderedGems: Enabled: true # To discuss: Suggest true but 3 fails on Chopin, 21 on Rater # Gemspec/DependencyVersion: # Enabled: true # TODO: 1 autocorrectable in Rater and it would pass # Gemspec/DeprecatedAttributeAssignment: # Enabled: true # To discuss: Suggest true but 2 fails on Chopin, 10 on Rater # Gemspec/DevelopmentDependencies: # Enabled: true Gemspec/DuplicatedAssignment: Enabled: true Gemspec/OrderedDependencies: Enabled: true # TODO: Suggest true but 4 fails on Chopin, 3 on Rater, overridden to false on Chopin # Gemspec/RequireMFA: # Enabled: true # TODO: Suggest true but 3 fails on Chopin # Gemspec/RequiredRubyVersion: # Enabled: true Gemspec/RubyVersionGlobalsUsage: Enabled: true Layout/AccessModifierIndentation: Enabled: true Layout/ArgumentAlignment: Enabled: true Layout/ArrayAlignment: Enabled: true Layout/AssignmentIndentation: Enabled: true Layout/BeginEndAlignment: Enabled: true Layout/BlockAlignment: Enabled: true Layout/BlockEndNewline: Enabled: true Layout/CaseIndentation: Enabled: true # Discussion needed about preferred structure. Dozens of fails on each repo if we stick with default, all but 4 on Chopin are autocorrectable # Layout/ClassStructure: # Enabled: true Layout/ClosingHeredocIndentation: Enabled: true Layout/ClosingParenthesisIndentation: Enabled: true Layout/CommentIndentation: Enabled: true Layout/ConditionPosition: Enabled: true Layout/DefEndAlignment: Enabled: true Layout/DotPosition: Enabled: true Layout/ElseAlignment: Enabled: true Layout/EmptyComment: Enabled: true Layout/EmptyLineAfterGuardClause: Enabled: true # To discuss. Suggest should be true but 500+ autocorrectable fails on Chopin. None on others # Layout/EmptyLineAfterMagicComment: # Enabled: true Layout/EmptyLineAfterMultilineCondition: Enabled: true Layout/EmptyLineBetweenDefs: Enabled: true Layout/EmptyLines: Enabled: true Layout/EmptyLinesAroundAccessModifier: Enabled: true Layout/EmptyLinesAroundArguments: Enabled: true Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/EmptyLinesAroundBeginBody: Enabled: true Layout/EmptyLinesAroundBlockBody: Enabled: true Layout/EmptyLinesAroundClassBody: Enabled: true Layout/EmptyLinesAroundExceptionHandlingKeywords: Enabled: true Layout/EmptyLinesAroundMethodBody: Enabled: true Layout/EmptyLinesAroundModuleBody: Enabled: true Layout/EndAlignment: Enabled: true Layout/EndOfLine: Enabled: true Layout/ExtraSpacing: Enabled: true Layout/FirstArgumentIndentation: Enabled: true Layout/FirstArrayElementIndentation: Enabled: true Layout/FirstArrayElementLineBreak: Enabled: true Layout/FirstMethodArgumentLineBreak: Enabled: true Layout/FirstHashElementIndentation: Enabled: true Layout/FirstHashElementLineBreak: Enabled: true # To discuss - 200+ fails on CoCo, none elsewhere # Layout/FirstMethodArgumentLineBreak: # Enabled: true # To discuss - 100+ fails on Chopin, handful on others # Layout/FirstMethodParameterLineBreak: # Enabled: true Layout/FirstParameterIndentation: Enabled: true Layout/HashAlignment: Enabled: true Layout/HeredocArgumentClosingParenthesis: Enabled: true Layout/HeredocIndentation: Enabled: true Layout/IndentationConsistency: Enabled: true Layout/IndentationStyle: Enabled: true Layout/IndentationWidth: Enabled: true Layout/InitialIndentation: Enabled: true Layout/LeadingCommentSpace: Enabled: true Layout/LeadingEmptyLines: Enabled: true # Overridden to false in Chopin Layout/LineContinuationLeadingSpace: Enabled: true # Overridden to false in Chopin Layout/LineContinuationSpacing: Enabled: true # Overridden to false in Chopin Layout/LineEndStringConcatenationIndentation: Enabled: true # To discuss: configure line length? At default 120: 6805 fails on Chopin, 3 on Rater, 179 on CoCo # Layout/LineLength # Enabled: false Layout/MultilineArrayBraceLayout: Enabled: true # To discuss: 100s of fails on each repo but autocorrectable # Layout/MultilineArrayLineBreaks: # Enabled: true # To discuss: 100s of fails on each repo but autocorrectable # Layout/MultilineAssignmentLayout: # Enabled: true Layout/MultilineBlockLayout: Enabled: true Layout/MultilineHashBraceLayout: Enabled: true # To discuss: 100s of fails on each repo but autocorrectable # Layout/MultilineHashKeyLineBreaks: # Enabled: true # To discuss: 1000s of fails on each repo but autocorrectable # Layout/MultilineMethodArgumentLineBreaks: # Enabled: true Layout/MultilineMethodCallBraceLayout: Enabled: true Layout/MultilineMethodCallIndentation: Enabled: true Layout/MultilineMethodDefinitionBraceLayout: Enabled: true # To discuss: 100s of fails on each repo but autocorrectable # Layout/MultilineMethodParameterLineBreaks: # Enabled: true Layout/MultilineOperationIndentation: Enabled: true Layout/ParameterAlignment: Enabled: true # For discussion: 1000s of fails, all autocorrectable # Layout/RedundantLineBreak: # Enabled: true Layout/RescueEnsureAlignment: Enabled: true # For discussion: 1000s of fails, all autocorrectable # Layout/SingleLineBlockChain: # Enabled: true Layout/SpaceAfterColon: Enabled: true Layout/SpaceAfterComma: Enabled: true Layout/SpaceAfterMethodName: Enabled: true Layout/SpaceAfterNot: Enabled: true Layout/SpaceAfterSemicolon: Enabled: true Layout/SpaceAroundBlockParameters: Enabled: true Layout/SpaceAroundEqualsInParameterDefault: Enabled: true Layout/SpaceAroundKeyword: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Layout/SpaceAroundOperators: Enabled: true Layout/SpaceBeforeBlockBraces: Enabled: true Layout/SpaceBeforeBrackets: Enabled: true Layout/SpaceBeforeComma: Enabled: true Layout/SpaceBeforeComment: Enabled: true Layout/SpaceBeforeFirstArg: Enabled: true Layout/SpaceBeforeSemicolon: Enabled: true Layout/SpaceInLambdaLiteral: Enabled: true Layout/SpaceInsideArrayLiteralBrackets: Enabled: true Layout/SpaceInsideArrayPercentLiteral: Enabled: true Layout/SpaceInsideBlockBraces: Enabled: true Layout/SpaceInsideHashLiteralBraces: Enabled: true Layout/SpaceInsideParens: Enabled: true Layout/SpaceInsidePercentLiteralDelimiters: Enabled: true Layout/SpaceInsideRangeLiteral: Enabled: true Layout/SpaceInsideReferenceBrackets: Enabled: true Layout/SpaceInsideStringInterpolation: Enabled: true Layout/TrailingEmptyLines: Enabled: true Layout/TrailingWhitespace: Enabled: true Lint/AmbiguousAssignment: Enabled: true Lint/AmbiguousBlockAssociation: Exclude: - spec/**/* Lint/AmbiguousOperator: Enabled: true # Overridden to false in Chopin Lint/AmbiguousOperatorPrecedence: Enabled: true # Overridden to false in Chopin Lint/AmbiguousRange: Enabled: true # TODO: One fail on rater spec then would pass # Lint/AmbiguousRegexpLiteral: # Enabled: true Lint/AssignmentInCondition: Enabled: true Lint/BigDecimalNew: Enabled: true Lint/BinaryOperatorWithIdenticalOperands: Enabled: true Lint/BooleanSymbol: Enabled: true Lint/CircularArgumentReference: Enabled: true # TODO: 6 fails in Rater, otherwise clear # Lint/ConstantDefinitionInBlock: # Enabled: true Lint/ConstantOverwrittenInRescue: # new in 1.31 Enabled: true # Set to false as 10000s of fails on Rater and Chopin if enabled # Rubocop docs suggest enabling only for constants that may cause concern # so enable and set these if required Lint/ConstantResolution: Enabled: false Lint/Debugger: Enabled: true Lint/DeprecatedClassMethods: Enabled: true Lint/DeprecatedConstants: Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/DisjunctiveAssignmentInConstructor: Enabled: true Lint/DuplicateBranch: Enabled: true Lint/DuplicateCaseCondition: Enabled: true Lint/DuplicateElsifCondition: Enabled: true Lint/DuplicateHashKey: Enabled: true Lint/DuplicateMagicComment: Enabled: true Lint/DuplicateMatchPattern: Enabled: true Lint/DuplicateMethods: Enabled: true Lint/DuplicateRegexpCharacterClassElement: Enabled: true Lint/DuplicateRequire: Enabled: true Lint/DuplicateRescueException: Enabled: true Lint/EachWithObjectArgument: Enabled: true # TODO: 19 autocorrectable odd else layouts in Rater # Lint/ElseLayout: # Enabled: true Lint/EmptyBlock: Enabled: true Lint/EmptyClass: Enabled: true Lint/EmptyConditionalBody: Enabled: true Lint/EmptyEnsure: Enabled: true Lint/EmptyExpression: Enabled: true Lint/EmptyFile: Enabled: true Lint/EmptyInPattern: # new in 1.16 Enabled: true Lint/EmptyInterpolation: Enabled: true Lint/EmptyWhen: Enabled: true Lint/ErbNewArguments: Enabled: true Lint/FlipFlop: Enabled: true Lint/FloatComparison: Enabled: true Lint/FloatOutOfRange: Enabled: true Lint/FormatParameterMismatch: Enabled: true Lint/HashCompareByIdentity: Enabled: true Lint/HeredocMethodCallPosition: Enabled: true Lint/IdentityComparison: Enabled: true Lint/ImplicitStringConcatenation: Enabled: true Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21 Enabled: true # TODO: two fails on Rater, one on CoCo, otherwise fine to enable # Lint/IneffectiveAccessModifier: # Enabled: true Lint/InheritException: Enabled: true Lint/InterpolationCheck: Enabled: true Lint/LambdaWithoutLiteralBlock: Enabled: true Lint/LiteralAsCondition: Enabled: true Lint/LiteralInInterpolation: Enabled: true Lint/Loop: Enabled: true Lint/MissingCopEnableDirective: Enabled: true # TODO: Handful of errors on Rater and CoCo # Lint/MissingSuper: # Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/MultipleComparison: Enabled: true Lint/NestedMethodDefinition: Enabled: true Lint/NestedPercentLiteral: Enabled: true Lint/NextWithoutAccumulator: Enabled: true Lint/NoReturnInBeginEndBlocks: Enabled: true # Overridden to false in Chopin Lint/NonAtomicFileOperation: Enabled: true Lint/NonDeterministicRequireOrder: Enabled: true Lint/NonLocalExitFromIterator: Enabled: true # 100s of fails on Rater and Chopin # Lint/NumberConversion: # Enabled: true Lint/NumberedParameterAssignment: Enabled: true Lint/OrAssignmentToConstant: Enabled: true Lint/OrderedMagicComments: Enabled: true Lint/OutOfRangeRegexpRef: Enabled: true Lint/ParenthesesAsGroupedExpression: Enabled: true Lint/PercentStringArray: Enabled: true Lint/PercentSymbolArray: Enabled: true Lint/RaiseException: Enabled: true Lint/RandOne: Enabled: true # Can't be checked with --only, enable once Rater and Chopin up to date with Simplycop # Lint/RedundantCopDisableDirective: # Enabled: true # Can't be checked with --only, enable once Rater and Chopin up to date with Simplycop # Lint/RedundantCopEnableDirective: # Enabled: true Lint/RedundantDirGlobSort: Enabled: true Lint/RedundantRequireStatement: Enabled: true Lint/RedundantSafeNavigation: Enabled: true Lint/RedundantSplatExpansion: Enabled: true Lint/RedundantStringCoercion: Enabled: true Lint/RedundantWithIndex: Enabled: true Lint/RedundantWithObject: Enabled: true Lint/RefinementImportMethods: Enabled: true Lint/RegexpAsCondition: Enabled: true Lint/RequireParentheses: Enabled: true Lint/RequireRangeParentheses: Enabled: true # Overridden to false in Chopin Lint/RequireRelativeSelfPath: Enabled: true Lint/RescueException: Enabled: true Lint/RescueType: Enabled: true Lint/ReturnInVoidContext: Enabled: true Lint/SafeNavigationChain: Enabled: true Lint/SafeNavigationConsistency: Enabled: true Lint/SafeNavigationWithEmpty: Enabled: true Lint/ScriptPermission: Enabled: true Lint/SelfAssignment: Enabled: true Lint/SendWithMixinArgument: Enabled: true Lint/ShadowedArgument: Enabled: true Lint/ShadowedException: Enabled: true # To discuss: 63 offences on Chopin, none on Rater, CoCo # Lint/ShadowingOuterLocalVariable: # Enabled: true Lint/StructNewOverride: Enabled: true Lint/SuppressedException: Enabled: true Lint/SymbolConversion: Enabled: true Lint/Syntax: Enabled: true Lint/ToEnumArguments: Enabled: true Lint/ToJSON: Enabled: true Lint/TopLevelReturnWithArgument: Enabled: true Lint/TrailingCommaInAttributeDeclaration: Enabled: true Lint/TripleQuotes: Enabled: true Lint/UnderscorePrefixedVariableName: Enabled: true Lint/UnexpectedBlockArity: Enabled: true Lint/UnifiedInteger: Enabled: true Lint/UnmodifiedReduceAccumulator: Enabled: true Lint/UnreachableCode: Enabled: true Lint/UnreachableLoop: Enabled: true Lint/UnusedBlockArgument: Enabled: true Lint/UnusedMethodArgument: Enabled: true Lint/UriEscapeUnescape: Enabled: true Lint/UriRegexp: Enabled: true Lint/UselessAccessModifier: Enabled: true Lint/UselessAssignment: Enabled: true Lint/UselessElseWithoutRescue: Enabled: true Lint/UselessMethodDefinition: Enabled: true # TODO: Single fail on Chopin # Lint/UselessRescue: # Enabled: true Lint/UselessRuby2Keywords: Enabled: true Lint/UselessSetterCall: Enabled: true Lint/UselessTimes: Enabled: true Lint/Void: Enabled: true # METRICS COPS # Metrics cops are enabled by default with the expectation that many repos will # have to set their own limits or disable. #technical-excellence-community discussion # suggested some liked to work from them, and that overriding should be a conscious decision Metrics/AbcSize: Enabled: true Metrics/BlockLength: Enabled: true Exclude: - spec/**/*.rb Metrics/BlockNesting: Enabled: true Metrics/ClassLength: Enabled: true Metrics/CollectionLiteralLength: Enabled: true Metrics/CyclomaticComplexity: Enabled: true Metrics/MethodLength: Enabled: true Exclude: - spec/**/*.rb Metrics/ModuleLength: Enabled: true Metrics/ParameterLists: CountKeywordArgs: false Enabled: true Metrics/PerceivedComplexity: Enabled: true Migration/DepartmentName: Enabled: true # Suggest true but causes 17 fails in Chopin, 6 in Rater, 2 in CoCo # Naming/AccessorMethodName: # Enabled: true Naming/AsciiIdentifiers: Enabled: true Naming/BinaryOperatorParameterName: Enabled: true Naming/BlockForwarding: Enabled: true Naming/BlockParameterName: Enabled: true Naming/ClassAndModuleCamelCase: Enabled: true Naming/ConstantName: Enabled: true Naming/FileName: Enabled: true Naming/HeredocDelimiterCase: Enabled: true Naming/HeredocDelimiterNaming: Enabled: true Naming/InclusiveLanguage: Enabled: true # To discuss: suggest true but 86 fails on Chopin # Naming/MemoizedInstanceVariableName: # Enabled: true Naming/MethodName: Enabled: true # To discuss: suggest true with possible allowed exceptions as below (10 fails on Chopin, exceptions would allow 4, # as and to are already exceptions in Rater so would remove need to configure there) # Naming/MethodParameterName: # Enabled: true # AllowedNames: # - as # - ex # - n # - to # To discuss: suggest true but 52 fails in Chopin, 8 in Coco (consider with Naming/AccessorName) # Naming/PredicateName: # Enabled: true # To discuss: Should decide on a style. Default e instead of err causes 47 fails on Chopin, none on Rater, CoCo # Naming/RescuedExceptionsVariableName: # Enabled: true Naming/VariableName: Enabled: true # To discuss: suggest enforce snake_case as this seems to be the preferred style # Default normalcase causes # Naming/VariableNumber: # Enabled: true # EnforcedStyle: snake_case # Overridden to false in Chopin Security/CompoundHash: Enabled: true # Should probably be set to true but 13 offences in chopin spec # Security/Eval: # Enabled: true # Overridden to false on Chopin Security/IoMethods: Enabled: true # Should probably be set to true but 18 offences in chopin spec # Security/JSONLoad: # Enabled: true Security/MarshalLoad: Enabled: true Security/Open: Enabled: true # Two fails on ContinuousCover, others fine # Security/YAMLLoad: # Enabled: true Style/AccessModifierDeclarations: Enabled: false Style/AccessorGrouping: Enabled: true Style/Alias: Enabled: false Style/AndOr: Enabled: true Style/ArgumentsForwarding: Enabled: true Style/ArrayCoercion: Enabled: true # Overridden to false in Chopin Style/ArrayIntersect: Enabled: true Style/ArrayJoin: Enabled: true Style/AsciiComments: Enabled: true AllowedChars: - £ - © Style/Attr: Enabled: true # Requires fixes in Chopin and Rater # Style/AutoResourceCleanup: # Enabled: true # Requires discussion # Style/BarePercentLiterals: Style/BeginBlock: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/BlockComments: Enabled: true # Requires discussion - 1000+ offences in Chopin alone, unless options set # Style/BlockDelimiters: Style/CaseEquality: Enabled: true Style/CaseLikeIf: Enabled: true Style/CharacterLiteral: Enabled: true # Requires discussion # Style/ClassAndModuleChildren: Style/ClassCheck: Enabled: true Style/ClassEqualityComparison: Enabled: true Style/ClassMethods: Enabled: true # Requires discussion - multiple fails on Chopin/Rater/CoCo when left at default # Style/ClassMethodsDefinitions: # Enabled: true Style/ClassVars: Enabled: true Style/CollectionCompact: Enabled: true # Requires discussion - multiple fails on Chopin/Rater/CoCo when left at default # Style/CollectionMethods: Style/ColonMethodCall: Enabled: true Severity: warning Style/ColonMethodDefinition: Enabled: true Style/CombinableLoops: Enabled: true Style/CommandLiteral: Enabled: true Style/CommentAnnotation: Enabled: true Style/CommentedKeyword: Enabled: true # TODO: Single fail on Rater Style/ComparableClamp: Enabled: true Style/ConcatArrayLiterals: Enabled: true Style/ConditionalAssignment: Enabled: true # Requires discussion - 1000+ offences in Chopin alone, unless options set # Style/ConstantVisibility: # For discussion # Style/Copyright: Style/DataInheritance: Enabled: true # Requires discussion - multiple fails on Chopin/Rater/CoCo if true # Style/DateTime: # Enabled: false Style/DefWithParentheses: Enabled: true Style/Dir: Enabled: true Style/DirEmpty: Enabled: true # For discussion - - multiple fails on Chopin/Rater/CoCo # Style/DisableCopsWithinSourceCodeDirective: Style/DocumentDynamicEvalDefinition: Enabled: false Style/Documentation: Enabled: false # Requires discussion - suggest false as 7000+ offences in Chopin alone # Style/DocumentationMethod: # Enabled: false Style/DoubleCopDisableDirective: Enabled: true Style/DoubleNegation: Enabled: true # Suggest true but 100+ fails on Rater, none on Chopin or CoCo # Style/EachForSimpleLoop: # Enabled: true Style/EachWithObject: Enabled: true Style/EmptyBlockParameter: Enabled: true Style/EmptyCaseCondition: Enabled: true Style/EmptyElse: Enabled: true Style/EmptyHeredoc: # new in 1.32 Enabled: true Style/EmptyLambdaParameter: Enabled: true Style/EmptyLiteral: Enabled: true Style/EmptyMethod: Enabled: true Style/Encoding: Enabled: true Style/EndBlock: Enabled: true Style/EndlessMethod: Enabled: true Style/EnvHome: Enabled: true Style/EvalWithLocation: Enabled: true Style/EvenOdd: Enabled: true Style/ExactRegexpMatch: Enabled: true Style/ExpandPathArguments: Enabled: true Style/ExplicitBlockArgument: Enabled: true Style/ExponentialNotation: Enabled: false # Overridden to false in Chopin Style/FetchEnvVar: Enabled: true Style/FileEmpty: Enabled: true Style/FileRead: # new in 1.24 Enabled: true # Overridden to false in Chopin Style/FileWrite: Enabled: true Style/FloatDivision: Enabled: true Style/For: Enabled: true Style/FormatString: Enabled: false Style/FormatStringToken: Enabled: false Style/FrozenStringLiteralComment: Enabled: false Style/GlobalStdStream: Enabled: true Style/GlobalVars: Enabled: true Style/GuardClause: Enabled: false Style/HashAsLastArrayItem: Enabled: true Style/HashConversion: Enabled: true Style/HashEachMethods: Enabled: false Style/HashExcept: Enabled: true Style/HashLikeCase: Enabled: false Style/HashSyntax: Enabled: true EnforcedStyle: no_mixed_keys EnforcedShorthandSyntax: consistent Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/IdenticalConditionalBranches: Enabled: true Style/IfInsideElse: Enabled: true Style/IfUnlessModifier: Enabled: false Style/IfUnlessModifierOfIfUnless: Enabled: true Style/IfWithBooleanLiteralBranches: Enabled: true Style/IfWithSemicolon: Enabled: true # For dicussion - 100s of fails on Chopin, CoCo, Rater # Style/ImplicitRuntimeError: # Enabled: false Style/InfiniteLoop: Enabled: true # For discussion - suggest false as 1000s of fails # Style/InlineComment: # Enabled: false Style/InverseMethods: Enabled: true # Manageable number of fails on Chopin, CoCo, Rater, suggest true # Style/InvertibleUnlessCondition: # Enabled: true Style/InPatternThen: # new in 1.16 Enabled: true # For discussion - multiple fails but most could be solved by excluding spec files # Style/IpAddresses: # Enabled: true # Exclude: [*spec.rb] Style/KeywordParametersOrder: Enabled: true Style/Lambda: Enabled: true Style/LambdaCall: Enabled: true Style/LineEndConcatenation: Enabled: true Style/MagicCommentFormat: # new in 1.35 Enabled: true Style/MapCompactWithConditionalBlock: # new in 1.30 Enabled: true # Overridden to false in Chopin Style/MapToHash: Enabled: true # Overridden to false in Chopin Style/MapToSet: Enabled: true # For discussion - 1000s of fails, suggest false # Style/MethodCallWithArgsParentheses: # Enabled: false Style/MethodCallWithoutArgsParentheses: Enabled: false # For discussion - 100s of fails, suggest false # Style/MethodCalledOnDoEndBlock: # Enabled: false Style/MethodDefParentheses: Enabled: true Style/MinMax: Enabled: true # Overridden to false in Chopin Style/MinMaxComparison: Enabled: true # For discussion - 100s of fails with default true # Style/MissingElse: # Enabled: true Style/MissingRespondToMissing: Enabled: true Style/MixinGrouping: Enabled: true Style/MixinUsage: Enabled: true Style/ModuleFunction: Enabled: true Style/MultilineBlockChain: Enabled: true Style/MultilineIfModifier: Enabled: true Style/MultilineIfThen: Enabled: true Style/MultilineInPatternThen: # new in 1.16 Enabled: true Style/MultilineMemoization: Enabled: true # For discussion - suggest true, but 100s of fails in Chopin and handful in CoCo # Style/MultilineMethodSignature: # Enabled: true Style/MultilineTernaryOperator: Enabled: true Style/MultilineWhenThen: Enabled: true Style/MultipleComparison: Enabled: true Style/MutableConstant: Enabled: false Style/NegatedIf: Enabled: true Style/NegatedIfElseCondition: Enabled: true Style/NegatedUnless: Enabled: true Style/NegatedWhile: Enabled: true Style/NestedFileDirname: # new in 1.26 Enabled: true Style/NestedModifier: Enabled: true Style/NestedParenthesizedCalls: Enabled: true Style/NestedTernaryOperator: Enabled: true Style/Next: Enabled: true Style/NilComparison: Enabled: true Style/NilLambda: Enabled: true Style/NonNilCheck: Enabled: true Style/Not: Enabled: true Style/NumberedParameters: # new in 1.22 Enabled: true Style/NumberedParametersLimit: # new in 1.22 Enabled: true Style/NumericLiteralPrefix: Enabled: true Style/NumericLiterals: Enabled: true Style/NumericPredicate: Enabled: false Style/ObjectThen: # new in 1.28 Enabled: true Style/OneLineConditional: Enabled: true # Overridden to false in Chopin Style/OpenStructUse: Enabled: true Style/OperatorMethodCall: Enabled: true Style/OptionHash: Enabled: true Style/OptionalArguments: Enabled: true Style/OptionalBooleanParameter: Enabled: true Style/OrAssignment: Enabled: true Style/ParallelAssignment: Enabled: true Style/ParenthesesAroundCondition: Enabled: true Style/PercentLiteralDelimiters: Enabled: true Style/PercentQLiterals: Enabled: true Style/PerlBackrefs: Enabled: true Style/PreferredHashMethods: Enabled: true Style/Proc: Enabled: true # Overridden to false in Chopin Style/QuotedSymbols: Enabled: true Style/RaiseArgs: Enabled: true Style/RandomWithOffset: Enabled: true Style/RedundantArgument: Enabled: false Style/RedundantAssignment: Enabled: true Style/RedundantBegin: Enabled: true Style/RedundantCapitalW: Enabled: true Style/RedundantCondition: Enabled: true Style/RedundantConditional: Enabled: true Style/RedundantConstantBase: Enabled: false Style/RedundantDoubleSplatHashBraces: Enabled: true Style/RedundantEach: Enabled: true Style/RedundantException: Enabled: true Style/RedundantFetchBlock: Enabled: true Style/RedundantFileExtensionInRequire: Enabled: true Style/RedundantFreeze: Enabled: true Style/RedundantHeredocDelimiterQuotes: Enabled: true Style/RedundantInitialize: Enabled: true Style/RedundantInterpolation: Enabled: false Style/RedundantLineContinuation: Enabled: true Style/RedundantParentheses: Enabled: true Style/RedundantPercentQ: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/RedundantReturn: Enabled: true Severity: warning Style/RedundantSelf: Enabled: true Style/RedundantSelfAssignment: Enabled: true # Overridden to false in Chopin Style/RedundantSelfAssignmentBranch: Enabled: true Style/RedundantSort: Enabled: true Style/RedundantSortBy: Enabled: true # Overridden to false in Chopin Style/RedundantStringEscape: Enabled: true # For discussion - CoCo, Rater OK, manageable amount of autocorrectable in Chopin if set true # Style/RegexpLiteral: # Enabled: true # For discussion - dozens of fails, suggest false as autocorrect also unsafe # Style/RequireOrder: # Enabled: false Style/RescueModifier: Enabled: true Style/RescueStandardError: Enabled: true # For discussion - suggest false as fails in all three if set true # Style/ReturnNil: # Enabled: false Style/SafeNavigation: Enabled: false Style/Sample: Enabled: true # Overridden to false in Chopin Style/SelectByRegexp: Enabled: true Style/SelfAssignment: Enabled: true Style/Semicolon: Enabled: true # For discussion - 100s of fails on Chopin, some on CoCo # Style/Send: # Enabled: true Style/SignalException: Enabled: true Style/SingleArgumentDig: Enabled: true # If this is to be set true, desired param names need to be set for reduce and inject # (default is |acc, elem|) and current usage suggests domain relevant names are preferred Style/SingleLineBlockParams: Enabled: false Style/SingleLineMethods: Enabled: true Style/SlicingWithRange: Enabled: false Style/SoleNestedConditional: Enabled: true Style/SpecialGlobalVars: Enabled: true Severity: warning Style/StabbyLambdaParentheses: Enabled: true # For discussion - 100s of fails across Rater, Chopin, CoCo, so suggest false # Style/StaticClass: # Enabled: false # TODO: Small number of autocorrects in Chopin Style/StderrPuts: Enabled: true Style/StringChars: Enabled: true Style/StringConcatenation: Enabled: true # For discussion - 10000s of fails in Chopin and Rater so suggest false # Style/StringHashKeys: # Enabled: false Style/StringLiterals: Enabled: false Style/StringLiteralsInInterpolation: Enabled: true Style/StringMethods: Enabled: true Style/Strip: Enabled: true Style/StructInheritance: Enabled: true Style/SwapValues: Enabled: true Style/SymbolArray: EnforcedStyle: brackets Style/SymbolLiteral: Enabled: true Style/SymbolProc: Enabled: true Style/TernaryParentheses: Enabled: true # For discussion - suggest should be true or at least warn but large number of fails on repos # Style/TopLevelMethodDefinition: # Enabled: true Style/TrailingBodyOnClass: Enabled: true Style/TrailingBodyOnMethodDefinition: Enabled: true Style/TrailingBodyOnModule: Enabled: true # For discussion - 100s of fails on Chopin, none on others # Style/TrailingCommaInArguments: # Enabled: true # For discussion - 72 fails on Chopin, none on others # Style/TrailingCommaInArrayLiteral: # Enabled: true Style/TrailingCommaInBlockArgs: Enabled: true # For discussion - 100s of fails on Chopin and Coco, none on Rater # Style/TrailingCommaInHashLiteral: # Enabled: true Style/TrailingMethodEndStatement: Enabled: true Style/TrailingUnderscoreVariable: Enabled: true Style/TrivialAccessors: Enabled: true Style/UnlessElse: Enabled: true Style/UnlessLogicalOperators: Enabled: true Style/UnpackFirst: Enabled: true Style/VariableInterpolation: Enabled: true Style/WhenThen: Enabled: true Style/WhileUntilDo: Enabled: true Style/WhileUntilModifier: Enabled: true Style/WordArray: EnforcedStyle: brackets Style/YodaCondition: Enabled: false Style/YodaExpression: Enabled: false Style/ZeroLengthPredicate: Enabled: true