AllCops: Exclude: # `vendor` directory is excluded by default. - 'vendor/**/*' # `db/schema.rb` is generated automatically. - 'db/schema.rb' # `node_modules` directory is generated by npm. - 'node_modules/**/*' DisplayCopNames: true DisplayStyleGuide: true Bundler/OrderedGems: Enabled: false Lint/AmbiguousRegexpLiteral: Enabled: false Lint/AssignmentInCondition: Enabled: false # The cop reports not reasonable issues. So, disabled. # See. http://tech.sideci.com/entry/2016/11/01/105900 Lint/EmptyWhen: Enabled: false Lint/HandleExceptions: Enabled: false Lint/Loop: Enabled: false Lint/RescueException: Enabled: false Lint/UnneededCopDisableDirective: Enabled: false Lint/UnusedBlockArgument: Enabled: false Lint/UnusedMethodArgument: Enabled: false # If AbcSize > 50, really really really really really really really complex Metrics/AbcSize: Max: 50 # Use the default setting Metrics/BlockNesting: Enabled: true Metrics/BlockLength: Max: 30 Exclude: # RuboCop's default - 'Rakefile' - '**/*.rake' - 'spec/**/*.rb' # In many cases, config/routes.rb has very long block - 'config/routes.rb' Metrics/ClassLength: Enabled: false Metrics/CyclomaticComplexity: Max: 10 Metrics/LineLength: Max: 200 Metrics/MethodLength: Enabled: false Metrics/ModuleLength: Enabled: false # 7 parameters are tooooooo many Metrics/ParameterLists: Enabled: true Max: 7 # Use the default setting Metrics/PerceivedComplexity: Enabled: true Security/Eval: Enabled: false Security/MarshalLoad: Enabled: false Security/YAMLLoad: Enabled: false Layout/AccessModifierIndentation: Enabled: false Layout/AlignArguments: Enabled: false Layout/AlignArray: Enabled: false Layout/AlignHash: Enabled: false Layout/AlignParameters: Enabled: false Layout/BlockEndNewline: Enabled: false Layout/CaseIndentation: Enabled: false Layout/ClosingParenthesisIndentation: Enabled: false Layout/CommentIndentation: Enabled: false Layout/DotPosition: Enabled: false Layout/ElseAlignment: Enabled: false Layout/EmptyLineBetweenDefs: Enabled: false Layout/EmptyLines: Enabled: false Layout/EmptyLineAfterMagicComment: Enabled: false Layout/EmptyLineAfterGuardClause: Enabled: false Layout/EmptyLinesAroundAccessModifier: Enabled: false Layout/EmptyLinesAroundBeginBody: Enabled: false Layout/EmptyLinesAroundBlockBody: Enabled: false Layout/EmptyLinesAroundClassBody: Enabled: false Layout/EmptyLinesAroundExceptionHandlingKeywords: Enabled: false Layout/EmptyLinesAroundMethodBody: Enabled: false Layout/EmptyLinesAroundModuleBody: Enabled: false Layout/EndOfLine: Enabled: false Layout/ExtraSpacing: Enabled: false Layout/HeredocArgumentClosingParenthesis: Enabled: false Layout/IndentFirstArgument: Enabled: false Layout/IndentFirstArrayElement: Enabled: false Layout/IndentFirstParameter: Enabled: false Layout/IndentAssignment: Enabled: false Layout/IndentationConsistency: Enabled: false Layout/IndentationWidth: Enabled: false Layout/IndentFirstHashElement: Enabled: false Layout/IndentHeredoc: Enabled: false Layout/InitialIndentation: Enabled: false Layout/LeadingCommentSpace: Enabled: false Layout/MultilineArrayBraceLayout: Enabled: false Layout/MultilineAssignmentLayout: Enabled: false Layout/MultilineBlockLayout: Enabled: false Layout/MultilineHashBraceLayout: Enabled: false Layout/MultilineMethodCallBraceLayout: Enabled: false Layout/MultilineMethodCallIndentation: Enabled: false Layout/MultilineMethodDefinitionBraceLayout: Enabled: false Layout/MultilineOperationIndentation: Enabled: false Layout/RescueEnsureAlignment: Enabled: false Layout/SpaceAfterColon: Enabled: false Layout/SpaceAfterComma: Enabled: false Layout/SpaceAfterMethodName: Enabled: false Layout/SpaceAfterNot: Enabled: false Layout/SpaceAfterSemicolon: Enabled: false Layout/SpaceAroundBlockParameters: Enabled: false Layout/SpaceAroundEqualsInParameterDefault: Enabled: false Layout/SpaceAroundKeyword: Enabled: false Layout/SpaceAroundOperators: Enabled: false Layout/SpaceBeforeBlockBraces: Enabled: false Layout/SpaceBeforeComma: Enabled: false Layout/SpaceBeforeComment: Enabled: false Layout/SpaceBeforeFirstArg: Enabled: false Layout/SpaceBeforeSemicolon: Enabled: false Layout/SpaceInLambdaLiteral: Enabled: false Layout/SpaceInsideArrayLiteralBrackets: Enabled: false Layout/SpaceInsideArrayPercentLiteral: Enabled: false Layout/SpaceInsideBlockBraces: Enabled: false Layout/SpaceInsideHashLiteralBraces: Enabled: false Layout/SpaceInsideParens: Enabled: false Layout/SpaceInsidePercentLiteralDelimiters: Enabled: false Layout/SpaceInsideRangeLiteral: Enabled: false Layout/SpaceInsideReferenceBrackets: Enabled: false Layout/SpaceInsideStringInterpolation: Enabled: false Layout/TrailingBlankLines: Enabled: false Layout/TrailingWhitespace: Enabled: false Layout/BlockAlignment: Enabled: false Layout/DefEndAlignment: Enabled: false Layout/EndAlignment: Enabled: false Layout/ClosingHeredocIndentation: Enabled: false Layout/LeadingBlankLines: Enabled: false Naming/AccessorMethodName: Enabled: false Naming/BinaryOperatorParameterName: Enabled: false Naming/ConstantName: Enabled: false Naming/FileName: Enabled: false Naming/HeredocDelimiterNaming: Enabled: false Naming/MethodName: Enabled: false Naming/PredicateName: Enabled: false Naming/RescuedExceptionsVariableName: Enabled: false Naming/VariableName: Enabled: false Naming/VariableNumber: Enabled: false Naming/UncommunicativeBlockParamName: Enabled: false Naming/UncommunicativeMethodParamName: Enabled: false Style: Enabled: false Gemspec/OrderedDependencies: Enabled: false # ------------- Enabled cops # In many cases, hash keys should be a symbol, not a string. Style/StringHashKeys: Enabled: true