AllCops: TargetRubyVersion: 2.4 # this should match the oldest version in .github/workflows/tests.yaml's matrix NewCops: enable Include: - "lib/**/*.rb" - "ext/**/*.rb" Exclude: - "**/*.erb" - "acceptance/**/*" - "autotest/**/*" - "spec/**/*" - "tasks/**/*" - "vendor/**/*" # Turning off some failing checks until it is determined which one is breaking things Style/AccessorGrouping: Enabled: false Style/CaseLikeIf: Enabled: false Style/GlobalStdStream: Enabled: false Style/RedundantRegexpCharacterClass: Enabled: false Style/SoleNestedConditional: Enabled: false Style/StringConcatenation: Enabled: false # end turning things off for debugging Layout/ConditionPosition: Enabled: true Lint/ElseLayout: Enabled: true Lint/UnreachableCode: Enabled: true Lint/BinaryOperatorWithIdenticalOperands: Enabled: true # MAYBE useful - no return inside ensure block. Lint/EnsureReturn: Enabled: false # MAYBE useful - errors when rescue {} happens. Lint/SuppressedException: Enabled: false Lint/ShadowingOuterLocalVariable: Enabled: true # Can catch complicated strings. Lint/LiteralInInterpolation: Enabled: true # DISABLED really useless. Detects return as last statement. Style/RedundantReturn: Enabled: false # Disabled. Throws an error trying to run. Style/RedundantParentheses: Enabled: false # DISABLED since the instances do not seem to indicate any specific errors. Lint/AmbiguousOperator: Enabled: false # DISABLED since for all the checked, we are basically checking nil # TODO: Change the checking so that if the variable being assigned to has # a value ALREADY, then raise an error. Lint/AssignmentInCondition: Enabled: false # DISABLED - not useful Layout/SpaceBeforeComment: Enabled: false # DISABLED - not useful Style/HashSyntax: Enabled: false # USES: as shortcut for non nil&valid checking a = x() and a.empty? # DISABLED - not useful Style/AndOr: Enabled: false # DISABLED - not useful Style/RedundantSelf: Enabled: false # DISABLED - not useful Metrics/MethodLength: Enabled: false Metrics/BlockLength: Enabled: false # DISABLED - not useful Style/WhileUntilModifier: Enabled: false # DISABLED - the offender is just haskell envy Lint/AmbiguousRegexpLiteral: Enabled: false # DISABLED Security/Eval: Enabled: false # DISABLED Layout/BlockAlignment: Enabled: false # DISABLED Layout/DefEndAlignment: Enabled: false # DISABLED Layout/EndAlignment: Enabled: false # DISABLED Lint/DeprecatedClassMethods: Enabled: false # DISABLED Lint/Loop: Enabled: false # DISABLED Lint/ParenthesesAsGroupedExpression: Enabled: false Lint/RescueException: Enabled: false Lint/RedundantStringCoercion: Enabled: false Lint/UnusedBlockArgument: Enabled: false Lint/UnusedMethodArgument: Enabled: false # DISABLED - TODO Lint/UselessAccessModifier: Enabled: false # DISABLED - TODO Lint/UselessAssignment: Enabled: false # DISABLED - TODO Lint/Void: Enabled: false Layout/AccessModifierIndentation: Enabled: false Naming/AccessorMethodName: Enabled: false Style/Alias: Enabled: false Layout/ArrayAlignment: Enabled: false Layout/HashAlignment: Enabled: false Layout/ParameterAlignment: Enabled: false Layout/HeredocIndentation: Enabled: false Metrics/BlockNesting: Enabled: false Style/AsciiComments: Enabled: false Style/Attr: Enabled: false Style/CaseEquality: Enabled: false Style/SymbolArray: Enabled: false Style/EmptyCaseCondition: Enabled: false Layout/CaseIndentation: Enabled: false Layout/MultilineMethodCallBraceLayout: Enabled: false Style/CharacterLiteral: Enabled: false Naming/ClassAndModuleCamelCase: Enabled: false Style/ClassAndModuleChildren: Enabled: false Style/ClassCheck: Enabled: false Metrics/ClassLength: Enabled: false Style/ClassMethods: Enabled: false Style/ClassVars: Enabled: false Style/WhenThen: Enabled: false # DISABLED - not useful Style/WordArray: Enabled: false Style/RedundantPercentQ: Enabled: false Layout/IndentationStyle: Enabled: false Layout/SpaceBeforeSemicolon: Enabled: false Layout/TrailingEmptyLines: Enabled: false Layout/SpaceInsideBlockBraces: Enabled: false Layout/SpaceInsideHashLiteralBraces: Enabled: false Layout/SpaceInsideParens: Enabled: false Layout/LeadingCommentSpace: Enabled: false Layout/SpaceAfterColon: Enabled: false Layout/SpaceAfterComma: Enabled: false Layout/SpaceAroundKeyword: Enabled: false Layout/SpaceAfterMethodName: Enabled: false Layout/SpaceAfterNot: Enabled: false Layout/SpaceAfterSemicolon: Enabled: false Layout/SpaceAroundEqualsInParameterDefault: Enabled: false Layout/SpaceAroundOperators: Enabled: false Layout/SpaceBeforeBlockBraces: Enabled: false Layout/SpaceBeforeComma: Enabled: false Style/CollectionMethods: Enabled: false Layout/CommentIndentation: Enabled: false Style/ColonMethodCall: Enabled: false Style/CommentAnnotation: Enabled: false Metrics/CyclomaticComplexity: Enabled: false Naming/ConstantName: Enabled: false Style/Documentation: Enabled: false Style/DefWithParentheses: Enabled: false Style/PreferredHashMethods: Enabled: false Layout/DotPosition: Enabled: false # DISABLED - used for converting to bool Style/DoubleNegation: Enabled: false Style/EachWithObject: Enabled: false Layout/EmptyLineBetweenDefs: Enabled: false Layout/FirstArrayElementIndentation: Enabled: false Layout/FirstHashElementIndentation: Enabled: false Layout/IndentationConsistency: Enabled: false Layout/IndentationWidth: Enabled: false Layout/EmptyLines: Enabled: false Layout/EmptyLinesAroundAccessModifier: Enabled: false Style/EmptyLiteral: Enabled: false Layout/LineLength: Enabled: false Style/MethodCallWithoutArgsParentheses: Enabled: false Style/MethodDefParentheses: Enabled: false Style/LineEndConcatenation: Enabled: false Layout/TrailingWhitespace: Enabled: false Style/StringLiterals: Enabled: false Style/TrailingCommaInArrayLiteral: Enabled: false Style/TrailingCommaInHashLiteral: Enabled: false Style/TrailingCommaInArguments: Enabled: false Style/GlobalVars: Enabled: false Style/GuardClause: Enabled: false Style/IfUnlessModifier: Enabled: false Style/MultilineIfThen: Enabled: false Style/NegatedIf: Enabled: false Style/NegatedWhile: Enabled: false Style/Next: Enabled: false Style/SingleLineBlockParams: Enabled: false Style/SingleLineMethods: Enabled: false Style/SpecialGlobalVars: Enabled: false Style/TrivialAccessors: Enabled: false Style/UnlessElse: Enabled: false Style/VariableInterpolation: Enabled: false Naming/VariableName: Enabled: false Style/WhileUntilDo: Enabled: false Style/EvenOdd: Enabled: false Naming/FileName: Enabled: false Style/For: Enabled: false Style/Lambda: Enabled: false Naming/MethodName: Enabled: false Style/MultilineTernaryOperator: Enabled: false Style/NestedTernaryOperator: Enabled: false Style/NilComparison: Enabled: false Style/FormatString: Enabled: false Style/MultilineBlockChain: Enabled: false Style/Semicolon: Enabled: false Style/SignalException: Enabled: false Style/NonNilCheck: Enabled: false Style/Not: Enabled: false Style/NumericLiterals: Enabled: false Style/OneLineConditional: Enabled: false Naming/BinaryOperatorParameterName: Enabled: false Style/ParenthesesAroundCondition: Enabled: false Style/PercentLiteralDelimiters: Enabled: false Style/PerlBackrefs: Enabled: false Naming/PredicateName: Enabled: false Style/RedundantException: Enabled: false Style/SelfAssignment: Enabled: false Style/Proc: Enabled: false Style/RaiseArgs: Enabled: false Style/RedundantBegin: Enabled: false Style/RescueModifier: Enabled: false Style/RegexpLiteral: Enabled: false Lint/UnderscorePrefixedVariableName: Enabled: false Metrics/ParameterLists: Enabled: false Lint/RequireParentheses: Enabled: false Layout/SpaceBeforeFirstArg: Enabled: false Style/ModuleFunction: Enabled: false Lint/Debugger: Enabled: false Style/IfWithSemicolon: Enabled: false Style/Encoding: Enabled: false Metrics/PerceivedComplexity: Enabled: false Style/SymbolProc: Enabled: false Layout/SpaceInsideRangeLiteral: Enabled: false Style/InfiniteLoop: Enabled: false Style/BarePercentLiterals: Enabled: false Style/PercentQLiterals: Enabled: false Layout/MultilineBlockLayout: Enabled: false Metrics/AbcSize: Enabled: false Style/MutableConstant: Enabled: false Style/BlockDelimiters: Enabled: false Layout/EmptyLinesAroundClassBody: Enabled: false Style/ConditionalAssignment: Enabled: false Layout/ExtraSpacing: Enabled: false Layout/EmptyLinesAroundBlockBody: Enabled: false Layout/EmptyLinesAroundModuleBody: Enabled: false Layout/MultilineOperationIndentation: Enabled: false Style/EmptyElse: Enabled: false Style/StringLiteralsInInterpolation: Enabled: false Layout/MultilineMethodCallIndentation: Enabled: false Metrics/ModuleLength: Enabled: false Layout/EmptyLinesAroundMethodBody: Enabled: false Lint/IneffectiveAccessModifier: Enabled: false Layout/ClosingParenthesisIndentation: Enabled: false Style/RedundantInterpolation: Enabled: false Layout/ElseAlignment: Enabled: false Style/FrozenStringLiteralComment: Enabled: false Layout/FirstParameterIndentation: Enabled: false Style/IfInsideElse: Enabled: false Layout/AssignmentIndentation: Enabled: false Layout/SpaceAroundBlockParameters: Enabled: false Style/ParallelAssignment: Enabled: false Style/IdenticalConditionalBranches: Enabled: false Style/CommandLiteral: Enabled: false Lint/NestedMethodDefinition: Enabled: false Layout/SpaceInsideStringInterpolation: Enabled: false Style/NestedModifier: Enabled: false Lint/NonLocalExitFromIterator: Enabled: false Style/NestedParenthesizedCalls: Enabled: false Layout/RescueEnsureAlignment: Enabled: false Lint/DuplicateMethods: Enabled: false Style/TrailingUnderscoreVariable: Enabled: false Style/RedundantSortBy: Enabled: false Layout/InitialIndentation: Enabled: false Style/StructInheritance: Enabled: false Style/SymbolLiteral: Enabled: false Style/IfUnlessModifierOfIfUnless: Enabled: false Style/ZeroLengthPredicate: Enabled: false Bundler/OrderedGems: Enabled: false # Enforce LF line endings, even when on Windows Layout/EndOfLine: EnforcedStyle: lf Layout/SpaceAroundMethodCallOperator: Enabled: true Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Style/ExponentialNotation: Enabled: true Style/HashEachMethods: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true # Not used becuase too new for support matrix Style/NumericPredicate: Enabled: false # Not used becuase too new for support matrix Style/SafeNavigation: Enabled: false Style/MixinUsage: Enabled: false