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 Layout/EmptyLineAfterMultilineCondition: Enabled: true Layout/FirstArrayElementLineBreak: Enabled: true Layout/FirstMethodArgumentLineBreak: Enabled: true Layout/FirstHashElementLineBreak: Enabled: true Layout/HeredocArgumentClosingParenthesis: Enabled: true Layout/LineContinuationLeadingSpace: Enabled: true Layout/LineContinuationSpacing: Enabled: true Layout/LineEndStringConcatenationIndentation: Enabled: true Layout/SpaceBeforeBrackets: Enabled: true Lint/AmbiguousAssignment: Enabled: true Lint/AmbiguousBlockAssociation: Exclude: - spec/**/* Lint/AmbiguousOperatorPrecedence: Enabled: true Lint/AmbiguousRange: Enabled: true Lint/DeprecatedConstants: Enabled: true Lint/DuplicateBranch: Enabled: true Lint/DuplicateMagicComment: Enabled: true Lint/DuplicateMethods: Enabled: true Lint/DuplicateRegexpCharacterClassElement: Enabled: true Lint/EmptyBlock: Enabled: true Lint/EmptyClass: Enabled: true Lint/HeredocMethodCallPosition: Enabled: true Lint/LambdaWithoutLiteralBlock: Enabled: true Lint/NoReturnInBeginEndBlocks: Enabled: true Lint/NonAtomicFileOperation: Enabled: true Lint/NumberedParameterAssignment: Enabled: true Lint/OrAssignmentToConstant: Enabled: true Lint/RedundantDirGlobSort: Enabled: true Lint/RefinementImportMethods: Enabled: true Lint/RequireRangeParentheses: Enabled: true Lint/RequireRelativeSelfPath: Enabled: true Lint/SymbolConversion: Enabled: true Lint/ToEnumArguments: Enabled: true Lint/TripleQuotes: Enabled: true Lint/UnexpectedBlockArity: Enabled: true Lint/UnmodifiedReduceAccumulator: Enabled: true Lint/UselessRuby2Keywords: Enabled: true Metrics/BlockLength: Exclude: - spec/**/*.rb Metrics/ClassLength: Max: 512 Metrics/ParameterLists: CountKeywordArgs: false Enabled: true Naming/InclusiveLanguage: Enabled: true ###### COPS REVIEWED ABOVE THIS LINE ###### Security/CompoundHash: Enabled: true Security/IoMethods: Enabled: true Style/AccessModifierDeclarations: Enabled: false Style/AccessorGrouping: Enabled: true Style/Alias: Enabled: false Style/ArgumentsForwarding: Enabled: true Style/ArrayCoercion: Enabled: true Style/ArrayIntersect: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/CaseLikeIf: Enabled: true Style/CollectionCompact: Enabled: true Style/ColonMethodCall: Enabled: true Severity: warning Style/CombinableLoops: Enabled: true Style/ConcatArrayLiterals: Enabled: true Style/ConditionalAssignment: Enabled: true Style/DocumentDynamicEvalDefinition: Enabled: false Style/Documentation: Enabled: false Style/EndlessMethod: Enabled: true Style/EnvHome: Enabled: true Style/ExplicitBlockArgument: Enabled: true Style/ExponentialNotation: Enabled: false Style/FetchEnvVar: Enabled: true Style/FileWrite: Enabled: true Style/For: Enabled: true Style/FormatString: Enabled: false Style/FormatStringToken: Enabled: false Style/FrozenStringLiteralComment: Enabled: false Style/GlobalStdStream: 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/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/IfInsideElse: Enabled: true Style/IfUnlessModifier: Enabled: false Style/IfWithBooleanLiteralBranches: Enabled: true Style/KeywordParametersOrder: Enabled: true Style/LambdaCall: Enabled: true Style/MapToHash: Enabled: true Style/MethodDefParentheses: Enabled: true Style/MultilineTernaryOperator: Enabled: true Style/MutableConstant: Enabled: false Style/NegatedIfElseCondition: Enabled: true Style/NestedModifier: Enabled: true Style/NestedParenthesizedCalls: Enabled: true Style/NestedTernaryOperator: Enabled: true Style/NilLambda: Enabled: true Style/NumericPredicate: Enabled: false Style/OpenStructUse: Enabled: true Style/OperatorMethodCall: Enabled: true Style/OptionalArguments: Enabled: true Style/OptionalBooleanParameter: Enabled: true Style/ParenthesesAroundCondition: Enabled: true Style/QuotedSymbols: Enabled: true Style/RedundantArgument: Enabled: false Style/RedundantAssignment: Enabled: true Style/RedundantBegin: 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/RedundantInitialize: Enabled: true Style/RedundantInterpolation: Enabled: false Style/RedundantParentheses: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/RedundantReturn: Enabled: true Severity: warning Style/RedundantSelfAssignment: Enabled: true Style/RedundantSelfAssignmentBranch: Enabled: true Style/RedundantStringEscape: Enabled: true Style/SafeNavigation: Enabled: false Style/SelectByRegexp: Enabled: true Style/SelfAssignment: Enabled: true Style/SingleArgumentDig: Enabled: true Style/SlicingWithRange: Enabled: false Style/SoleNestedConditional: Enabled: true Style/SpecialGlobalVars: Enabled: true Severity: warning Style/StringChars: Enabled: true Style/StringConcatenation: Enabled: true Style/StringLiterals: Enabled: false Style/SwapValues: Enabled: true Style/SymbolArray: EnforcedStyle: brackets Style/UnlessElse: Enabled: true Style/WordArray: EnforcedStyle: brackets Style/ZeroLengthPredicate: Enabled: true Gemspec/DeprecatedAttributeAssignment: # new in 1.30 Enabled: true Lint/ConstantOverwrittenInRescue: # new in 1.31 Enabled: true Lint/EmptyInPattern: # new in 1.16 Enabled: true Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21 Enabled: true Naming/BlockForwarding: # new in 1.24 Enabled: true Style/EmptyHeredoc: # new in 1.32 Enabled: true Style/FileRead: # new in 1.24 Enabled: true Style/InPatternThen: # new in 1.16 Enabled: true Style/MagicCommentFormat: # new in 1.35 Enabled: true Style/MapCompactWithConditionalBlock: # new in 1.30 Enabled: true Style/MultilineInPatternThen: # new in 1.16 Enabled: true Style/NestedFileDirname: # new in 1.26 Enabled: true Style/NumberedParameters: # new in 1.22 Enabled: true Style/NumberedParametersLimit: # new in 1.22 Enabled: true Style/ObjectThen: # new in 1.28 Enabled: true