--- Layout/AccessModifierIndentation: Description: Check indentation of private/protected visibility modifiers. StyleGuide: "#indent-public-private-protected" Enabled: true EnforcedStyle: indent SupportedStyles: - outdent - indent IndentationWidth: Layout/AlignArray: Description: Align the elements of an array literal if they span more than one line. StyleGuide: "#align-multiline-arrays" Enabled: true Layout/AlignParameters: Description: Align the parameters of a method call if they span more than one line. StyleGuide: "#no-double-indent" Enabled: true EnforcedStyle: with_first_parameter SupportedStyles: - with_first_parameter - with_fixed_indentation IndentationWidth: Layout/CaseIndentation: Description: Indentation of when in a case/when/[else/]end. StyleGuide: "#indent-when-to-case" Enabled: true EnforcedStyle: case SupportedStyles: - case - end IndentOneStep: false IndentationWidth: Layout/DotPosition: Description: Checks the position of the dot in multi-line method calls. StyleGuide: "#consistent-multi-line-chains" Enabled: true EnforcedStyle: leading SupportedStyles: - leading - trailing Layout/EmptyLineBetweenDefs: Description: Use empty lines between defs. StyleGuide: "#empty-lines-between-methods" Enabled: true AllowAdjacentOneLineDefs: false NumberOfEmptyLines: 1 Layout/EmptyLines: Description: Don't use several empty lines in a row. StyleGuide: "#two-or-more-empty-lines" Enabled: true Layout/EmptyLinesAroundAccessModifier: Description: Keep blank lines around access modifiers. StyleGuide: "#empty-lines-around-access-modifier" Enabled: true Layout/EmptyLinesAroundBeginBody: Description: Keeps track of empty lines around begin-end bodies. StyleGuide: "#empty-lines-around-bodies" Enabled: true Layout/EmptyLinesAroundBlockBody: Description: Keeps track of empty lines around block bodies. StyleGuide: "#empty-lines-around-bodies" Enabled: true EnforcedStyle: no_empty_lines SupportedStyles: - empty_lines - no_empty_lines Layout/EmptyLinesAroundClassBody: Description: Keeps track of empty lines around class bodies. StyleGuide: "#empty-lines-around-bodies" Enabled: true EnforcedStyle: no_empty_lines SupportedStyles: - empty_lines - empty_lines_except_namespace - empty_lines_special - no_empty_lines Layout/EmptyLinesAroundExceptionHandlingKeywords: Description: Keeps track of empty lines around exception handling keywords. StyleGuide: "#empty-lines-around-bodies" Enabled: true Layout/EmptyLinesAroundModuleBody: Description: Keeps track of empty lines around module bodies. StyleGuide: "#empty-lines-around-bodies" Enabled: true EnforcedStyle: no_empty_lines SupportedStyles: - empty_lines - empty_lines_except_namespace - empty_lines_special - no_empty_lines Layout/EmptyLinesAroundMethodBody: Description: Keeps track of empty lines around method bodies. StyleGuide: "#empty-lines-around-bodies" Enabled: true Layout/EndOfLine: Description: Use Unix-style line endings. StyleGuide: "#crlf" Enabled: true EnforcedStyle: native SupportedStyles: - native - lf - crlf Layout/IndentationConsistency: Description: Keep indentation straight. StyleGuide: "#spaces-indentation" Enabled: true EnforcedStyle: normal SupportedStyles: - normal - rails Layout/IndentationWidth: Description: Use 2 spaces for indentation. StyleGuide: "#spaces-indentation" Enabled: true Width: 2 IgnoredPatterns: [] Layout/IndentHeredoc: Description: This cops checks the indentation of the here document bodies. StyleGuide: "#squiggly-heredocs" Enabled: true EnforcedStyle: auto_detection SupportedStyles: - auto_detection - squiggly - active_support - powerpack - unindent Layout/LeadingCommentSpace: Description: Comments should start with a space. StyleGuide: "#hash-space" Enabled: true Layout/EmptyLineAfterMagicComment: Description: Add an empty line after magic comments to separate them from code. StyleGuide: "#separate-magic-comments-from-code" Enabled: true Layout/SpaceAfterColon: Description: Use spaces after colons. StyleGuide: "#spaces-operators" Enabled: true Layout/SpaceAfterComma: Description: Use spaces after commas. StyleGuide: "#spaces-operators" Enabled: true Layout/SpaceAfterMethodName: Description: Do not put a space between a method name and the opening parenthesis in a method definition. StyleGuide: "#parens-no-spaces" Enabled: true Layout/SpaceAfterNot: Description: Tracks redundant space after the ! operator. StyleGuide: "#no-space-bang" Enabled: true Layout/SpaceAfterSemicolon: Description: Use spaces after semicolons. StyleGuide: "#spaces-operators" Enabled: true Layout/SpaceAroundEqualsInParameterDefault: Description: Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration. StyleGuide: "#spaces-around-equals" Enabled: true EnforcedStyle: space SupportedStyles: - space - no_space Layout/SpaceAroundOperators: Description: Use a single space around operators. StyleGuide: "#spaces-operators" Enabled: true AllowForAlignment: true Layout/SpaceInsideBrackets: Description: No spaces after [ or before ]. StyleGuide: "#no-spaces-braces" Enabled: true Layout/SpaceInsideHashLiteralBraces: Description: Use spaces inside hash literal braces - or don't. StyleGuide: "#spaces-operators" Enabled: true EnforcedStyle: space SupportedStyles: - space - no_space - compact EnforcedStyleForEmptyBraces: no_space SupportedStylesForEmptyBraces: - space - no_space Layout/SpaceInsideParens: Description: No spaces after ( or before ). StyleGuide: "#no-spaces-braces" Enabled: true Layout/SpaceInsideRangeLiteral: Description: No spaces inside range literals. StyleGuide: "#no-space-inside-range-literals" Enabled: true Layout/SpaceInsideStringInterpolation: Description: Checks for padding/surrounding spaces inside string interpolation. StyleGuide: "#string-interpolation" Enabled: true EnforcedStyle: no_space SupportedStyles: - space - no_space Layout/Tab: Description: No hard tabs. StyleGuide: "#spaces-indentation" Enabled: true IndentationWidth: Layout/TrailingBlankLines: Description: Checks trailing blank lines and final newline. StyleGuide: "#newline-eof" Enabled: true EnforcedStyle: final_newline SupportedStyles: - final_newline - final_blank_line Layout/TrailingWhitespace: Description: Avoid trailing whitespace. StyleGuide: "#no-trailing-whitespace" Enabled: true Naming/AccessorMethodName: Description: Check the naming of accessor methods for get_/set_. StyleGuide: "#accessor_mutator_method_names" Enabled: true Naming/AsciiIdentifiers: Description: Use only ascii symbols in identifiers. StyleGuide: "#english-identifiers" Enabled: true Naming/ClassAndModuleCamelCase: Description: Use CamelCase for classes and modules. StyleGuide: "#camelcase-classes" Enabled: true Naming/ConstantName: Description: Constants should use SCREAMING_SNAKE_CASE. StyleGuide: "#screaming-snake-case" Enabled: true Naming/FileName: Description: Use snake_case for source file names. StyleGuide: "#snake-case-files" Enabled: true Exclude: [] ExpectMatchingDefinition: false Regex: IgnoreExecutableScripts: true AllowedAcronyms: - CLI - DSL - ACL - API - ASCII - CPU - CSS - DNS - EOF - GUID - HTML - HTTP - HTTPS - ID - IP - JSON - LHS - QPS - RAM - RHS - RPC - SLA - SMTP - SQL - SSH - TCP - TLS - TTL - UDP - UI - UID - UUID - URI - URL - UTF8 - VM - XML - XMPP - XSRF - XSS Naming/HeredocDelimiterCase: Description: Use configured case for heredoc delimiters. StyleGuide: "#heredoc-delimiters" Enabled: true EnforcedStyle: uppercase SupportedStyles: - lowercase - uppercase Naming/HeredocDelimiterNaming: Description: Use descriptive heredoc delimiters. StyleGuide: "#heredoc-delimiters" Enabled: true Blacklist: - END - !ruby/regexp /EO[A-Z]{1}/ Naming/MethodName: Description: Use the configured style when naming methods. StyleGuide: "#snake-case-symbols-methods-vars" Enabled: true EnforcedStyle: snake_case SupportedStyles: - snake_case - camelCase Naming/PredicateName: Description: Check the names of predicate methods. StyleGuide: "#bool-methods-qmark" Enabled: true NamePrefix: - is_ - has_ - have_ NamePrefixBlacklist: - is_ - has_ - have_ NameWhitelist: - is_a? MethodDefinitionMacros: - define_method - define_singleton_method Exclude: - spec/**/* Naming/BinaryOperatorParameterName: Description: When defining binary operators, name the argument other. StyleGuide: "#other-arg" Enabled: true Naming/VariableName: Description: Use the configured style when naming variables. StyleGuide: "#snake-case-symbols-methods-vars" Enabled: true EnforcedStyle: snake_case SupportedStyles: - snake_case - camelCase Style/Alias: Description: Use alias instead of alias_method. StyleGuide: "#alias-method" Enabled: true EnforcedStyle: prefer_alias SupportedStyles: - prefer_alias - prefer_alias_method Style/AndOr: Description: Use &&/|| instead of and/or. StyleGuide: "#no-and-or-or" Enabled: true EnforcedStyle: always SupportedStyles: - always - conditionals Style/ArrayJoin: Description: Use Array#join instead of Array#*. StyleGuide: "#array-join" Enabled: true Style/AsciiComments: Description: Use only ascii symbols in comments. StyleGuide: "#english-comments" Enabled: true Style/Attr: Description: Checks for uses of Module#attr. StyleGuide: "#attr" Enabled: true Style/BeginBlock: Description: Avoid the use of BEGIN blocks. StyleGuide: "#no-BEGIN-blocks" Enabled: true Style/BarePercentLiterals: Description: Checks if usage of %() or %Q() matches configuration. StyleGuide: "#percent-q-shorthand" Enabled: true EnforcedStyle: bare_percent SupportedStyles: - percent_q - bare_percent Style/BlockComments: Description: Do not use block comments. StyleGuide: "#no-block-comments" Enabled: true Style/BlockDelimiters: Description: Avoid using {...} for multi-line blocks (multiline chaining is always ugly). Prefer {...} over do...end for single-line blocks. StyleGuide: "#single-line-blocks" Enabled: true EnforcedStyle: line_count_based SupportedStyles: - line_count_based - semantic - braces_for_chaining ProceduralMethods: - benchmark - bm - bmbm - create - each_with_object - measure - new - realtime - tap - with_object FunctionalMethods: - let - let! - subject - watch IgnoredMethods: - lambda - proc - it Style/CaseEquality: Description: Avoid explicit use of the case equality operator(===). StyleGuide: "#no-case-equality" Enabled: true Style/CharacterLiteral: Description: Checks for uses of character literals. StyleGuide: "#no-character-literals" Enabled: true Style/ClassAndModuleChildren: Description: Checks style of children classes and modules. StyleGuide: "#namespace-definition" Enabled: true EnforcedStyle: nested SupportedStyles: - nested - compact Style/ClassMethods: Description: Use self when defining module/class methods. StyleGuide: "#def-self-class-methods" Enabled: true Style/ClassVars: Description: Avoid the use of class variables. StyleGuide: "#no-class-vars" Enabled: true Style/ColonMethodCall: Description: 'Do not use :: for method call.' StyleGuide: "#double-colons" Enabled: true Style/CommandLiteral: Description: Use `` or %x around command literals. StyleGuide: "#percent-x" Enabled: true EnforcedStyle: backticks SupportedStyles: - backticks - percent_x - mixed AllowInnerBackticks: false Style/CommentAnnotation: Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW). StyleGuide: "#annotate-keywords" Enabled: true Keywords: - TODO - FIXME - OPTIMIZE - HACK - REVIEW Style/DateTime: Description: Use Date or Time over DateTime. StyleGuide: "#date--time" Enabled: true Style/DefWithParentheses: Description: Use def with parentheses when there are arguments. StyleGuide: "#method-parens" Enabled: true Style/DoubleNegation: Description: Checks for uses of double negation (!!). StyleGuide: "#no-bang-bang" Enabled: true Style/EmptyLiteral: Description: Prefer literals to Array.new/Hash.new/String.new. StyleGuide: "#literal-array-hash" Enabled: true Style/EmptyMethod: Description: Checks the formatting of empty method definitions. StyleGuide: "#no-single-line-methods" Enabled: true EnforcedStyle: compact SupportedStyles: - compact - expanded Style/EndBlock: Description: Avoid the use of END blocks. StyleGuide: "#no-END-blocks" Enabled: true Style/Encoding: Description: Use UTF-8 as the source file encoding. StyleGuide: "#utf-8" Enabled: true Style/EvenOdd: Description: Favor the use of Integer#even? && Integer#odd? StyleGuide: "#predicate-methods" Enabled: true Style/FlipFlop: Description: Checks for flip flops StyleGuide: "#no-flip-flops" Enabled: true Style/For: Description: Checks use of for or each in multiline loops. StyleGuide: "#no-for-loops" Enabled: true EnforcedStyle: each SupportedStyles: - for - each Style/FormatString: Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%. StyleGuide: "#sprintf" Enabled: true EnforcedStyle: format SupportedStyles: - format - sprintf - percent Style/GlobalVars: Description: Do not introduce global variables. StyleGuide: "#instance-vars" Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html Enabled: true AllowedVariables: [] Style/GuardClause: Description: Check for conditionals that can be replaced with guard clauses StyleGuide: "#no-nested-conditionals" Enabled: true MinBodyLength: 1 Style/HashSyntax: Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }.' StyleGuide: "#hash-literals" Enabled: true EnforcedStyle: ruby19 SupportedStyles: - ruby19 - hash_rockets - no_mixed_keys - ruby19_no_mixed_keys UseHashRocketsWithSymbolValues: false PreferHashRocketsForNonAlnumEndingSymbols: false Style/IfUnlessModifier: Description: Favor modifier if/unless usage when you have a single-line body. StyleGuide: "#if-as-a-modifier" Enabled: true MaxLineLength: 80 Style/IfWithSemicolon: Description: Do not use if x; .... Use the ternary operator instead. StyleGuide: "#no-semicolon-ifs" Enabled: true Style/InfiniteLoop: Description: Use Kernel#loop for infinite loops. StyleGuide: "#infinite-loop" Enabled: true Style/Lambda: Description: Use the new lambda literal syntax for single-line blocks. StyleGuide: "#lambda-multi-line" Enabled: true EnforcedStyle: line_count_dependent SupportedStyles: - line_count_dependent - lambda - literal Style/LambdaCall: Description: Use lambda.call(...) instead of lambda.(...). StyleGuide: "#proc-call" Enabled: true EnforcedStyle: call SupportedStyles: - call - braces Style/MethodCallWithoutArgsParentheses: Description: Do not use parentheses for method calls with no arguments. StyleGuide: "#method-invocation-parens" Enabled: true Style/MethodDefParentheses: Description: Checks if the method definitions have or don't have parentheses. StyleGuide: "#method-parens" Enabled: true EnforcedStyle: require_parentheses SupportedStyles: - require_parentheses - require_no_parentheses - require_no_parentheses_except_multiline Style/MethodMissing: Description: Avoid using `method_missing`. StyleGuide: "#no-method-missing" Enabled: true Style/MixinGrouping: Description: Checks for grouping of mixins in `class` and `module` bodies. StyleGuide: "#mixin-grouping" Enabled: true EnforcedStyle: separated SupportedStyles: - separated - grouped Style/ModuleFunction: Description: Checks for usage of `extend self` in modules. StyleGuide: "#module-function" Enabled: true EnforcedStyle: module_function SupportedStyles: - module_function - extend_self Style/MultilineBlockChain: Description: Avoid multi-line chains of blocks. StyleGuide: "#single-line-blocks" Enabled: true Style/MultilineIfThen: Description: Do not use then for multi-line if/unless. StyleGuide: "#no-then" Enabled: true Style/MultilineIfModifier: Description: Only use if/unless modifiers on single line statements. StyleGuide: "#no-multiline-if-modifiers" Enabled: true Style/MultilineTernaryOperator: Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.' StyleGuide: "#no-multiline-ternary" Enabled: true Style/NegatedIf: Description: Favor unless over if for negative conditions (or control flow or). StyleGuide: "#unless-for-negatives" Enabled: true EnforcedStyle: both SupportedStyles: - both - prefix - postfix Style/NegatedWhile: Description: Favor until over while for negative conditions. StyleGuide: "#until-for-negatives" Enabled: true Style/NestedModifier: Description: Avoid using nested modifiers. StyleGuide: "#no-nested-modifiers" Enabled: true Style/NestedTernaryOperator: Description: Use one expression per branch in a ternary operator. StyleGuide: "#no-nested-ternary" Enabled: true Style/Next: Description: Use `next` to skip iteration instead of a condition at the end. StyleGuide: "#no-nested-conditionals" Enabled: true EnforcedStyle: skip_modifier_ifs MinBodyLength: 3 SupportedStyles: - skip_modifier_ifs - always Style/NilComparison: Description: Prefer x.nil? to x == nil. StyleGuide: "#predicate-methods" Enabled: true Style/NonNilCheck: Description: Checks for redundant nil checks. StyleGuide: "#no-non-nil-checks" Enabled: true IncludeSemanticChanges: false Style/Not: Description: Use ! instead of not. StyleGuide: "#bang-not-not" Enabled: true Style/NumericLiterals: Description: Add underscores to large numeric literals to improve their readability. StyleGuide: "#underscores-in-numerics" Enabled: true MinDigits: 5 Strict: false Style/NumericLiteralPrefix: Description: Use smallcase prefixes for numeric literals. StyleGuide: "#numeric-literal-prefixes" Enabled: true EnforcedOctalStyle: zero_with_o SupportedOctalStyles: - zero_with_o - zero_only Style/NumericPredicate: Description: Checks for the use of predicate- or comparison methods for numeric comparisons. StyleGuide: "#predicate-methods" AutoCorrect: false Enabled: true EnforcedStyle: predicate SupportedStyles: - predicate - comparison Exclude: - spec/**/* Style/OneLineConditional: Description: Favor the ternary operator(?:) over if/then/else/end constructs. StyleGuide: "#ternary-operator" Enabled: true Style/OptionalArguments: Description: Checks for optional arguments that do not appear at the end of the argument list StyleGuide: "#optional-arguments" Enabled: true Style/OrAssignment: Description: Recommend usage of double pipe equals (||=) where applicable. StyleGuide: "#double-pipe-for-uninit" Enabled: true Style/ParallelAssignment: Description: Check for simple usages of parallel assignment. It will only warn when the number of variables matches on both sides of the assignment. StyleGuide: "#parallel-assignment" Enabled: true Style/ParenthesesAroundCondition: Description: Don't use parentheses around the condition of an if/unless/while. StyleGuide: "#no-parens-around-condition" Enabled: true AllowSafeAssignment: true Style/PercentLiteralDelimiters: Description: Use `%`-literal delimiters consistently StyleGuide: "#percent-literal-braces" Enabled: true PreferredDelimiters: default: "()" "%i": "[]" "%I": "[]" "%r": "{}" "%w": "[]" "%W": "[]" Style/PerlBackrefs: Description: Avoid Perl-style regex back references. StyleGuide: "#no-perl-regexp-last-matchers" Enabled: true Style/PreferredHashMethods: Description: Checks use of `has_key?` and `has_value?` Hash methods. StyleGuide: "#hash-key" Enabled: true EnforcedStyle: short SupportedStyles: - short - verbose Style/Proc: Description: Use proc instead of Proc.new. StyleGuide: "#proc" Enabled: true Style/RaiseArgs: Description: Checks the arguments passed to raise/fail. StyleGuide: "#exception-class-messages" Enabled: true EnforcedStyle: exploded SupportedStyles: - compact - exploded Style/RedundantBegin: Description: Don't use begin blocks when they are not needed. StyleGuide: "#begin-implicit" Enabled: true Style/RedundantException: Description: Checks for an obsolete RuntimeException argument in raise/fail. StyleGuide: "#no-explicit-runtimeerror" Enabled: true Style/RedundantReturn: Description: Don't use return where it's not required. StyleGuide: "#no-explicit-return" Enabled: true AllowMultipleReturnValues: false Style/RedundantSelf: Description: Don't use self where it's not needed. StyleGuide: "#no-self-unless-required" Enabled: true Style/RegexpLiteral: Description: Use / or %r around regular expressions. StyleGuide: "#percent-r" Enabled: true EnforcedStyle: slashes SupportedStyles: - slashes - percent_r - mixed AllowInnerSlashes: false Style/RescueModifier: Description: Avoid using rescue in its modifier form. StyleGuide: "#no-rescue-modifiers" Enabled: true Style/SelfAssignment: Description: Checks for places where self-assignment shorthand should have been used. StyleGuide: "#self-assignment" Enabled: true Style/Semicolon: Description: Don't use semicolons to terminate expressions. StyleGuide: "#no-semicolon" Enabled: true AllowAsExpressionSeparator: false Style/SignalException: Description: Checks for proper usage of fail and raise. StyleGuide: "#prefer-raise-over-fail" Enabled: true EnforcedStyle: only_raise SupportedStyles: - only_raise - only_fail - semantic Style/SingleLineMethods: Description: Avoid single-line methods. StyleGuide: "#no-single-line-methods" Enabled: true AllowIfMethodIsEmpty: true Style/SpecialGlobalVars: Description: Avoid Perl-style global variables. StyleGuide: "#no-cryptic-perlisms" Enabled: true EnforcedStyle: use_english_names SupportedStyles: - use_perl_names - use_english_names Style/StabbyLambdaParentheses: Description: Check for the usage of parentheses around stabby lambda arguments. StyleGuide: "#stabby-lambda-with-args" Enabled: true EnforcedStyle: require_parentheses SupportedStyles: - require_parentheses - require_no_parentheses Style/StderrPuts: Description: Use `warn` instead of `$stderr.puts`. StyleGuide: "#warn" Enabled: true Style/StringLiterals: Description: Checks if uses of quotes match the configured preference. StyleGuide: "#consistent-string-literals" Enabled: true EnforcedStyle: single_quotes SupportedStyles: - single_quotes - double_quotes ConsistentQuotesInMultiline: false Style/StructInheritance: Description: Checks for inheritance from Struct.new. StyleGuide: "#no-extend-struct-new" Enabled: true Style/SymbolArray: Description: Use %i or %I for arrays of symbols. StyleGuide: "#percent-i" Enabled: true EnforcedStyle: percent MinSize: 0 SupportedStyles: - percent - brackets Style/TrailingCommaInArguments: Description: Checks for trailing comma in argument lists. StyleGuide: "#no-trailing-params-comma" Enabled: true EnforcedStyleForMultiline: no_comma SupportedStylesForMultiline: - comma - consistent_comma - no_comma Style/TrailingCommaInLiteral: Description: Checks for trailing comma in array and hash literals. StyleGuide: "#no-trailing-array-commas" Enabled: true EnforcedStyleForMultiline: no_comma SupportedStylesForMultiline: - comma - consistent_comma - no_comma Style/TrivialAccessors: Description: Prefer attr_* methods to trivial readers/writers. StyleGuide: "#attr_family" Enabled: true ExactNameMatch: true AllowPredicates: true AllowDSLWriters: false IgnoreClassMethods: false Whitelist: - to_ary - to_a - to_c - to_enum - to_h - to_hash - to_i - to_int - to_io - to_open - to_path - to_proc - to_r - to_regexp - to_str - to_s - to_sym Style/UnlessElse: Description: Do not use unless with else. Rewrite these with the positive case first. StyleGuide: "#no-else-with-unless" Enabled: true Style/UnneededPercentQ: Description: Checks for %q/%Q when single quotes or double quotes would do. StyleGuide: "#percent-q" Enabled: true Style/VariableInterpolation: Description: Don't interpolate global, instance and class variables directly in strings. StyleGuide: "#curlies-interpolate" Enabled: true Style/WhenThen: Description: Use when x then ... for one-line cases. StyleGuide: "#one-line-cases" Enabled: true Style/WhileUntilDo: Description: Checks for redundant do after while or until. StyleGuide: "#no-multiline-while-do" Enabled: true Style/WhileUntilModifier: Description: Favor modifier while/until usage when you have a single-line body. StyleGuide: "#while-as-a-modifier" Enabled: true MaxLineLength: 80 Style/WordArray: Description: Use %w or %W for arrays of words. StyleGuide: "#percent-w" Enabled: true EnforcedStyle: percent SupportedStyles: - percent - brackets MinSize: 0 WordRegex: !ruby/regexp /\A[\p{Word}\n\t]+\z/ Metrics/BlockNesting: Description: Avoid excessive block nesting StyleGuide: "#three-is-the-number-thou-shalt-count" Enabled: true CountBlocks: false Max: 3 Metrics/LineLength: Description: Limit lines to 80 characters. StyleGuide: "#80-character-limits" Enabled: true Max: 80 AllowHeredoc: true AllowURI: true URISchemes: - http - https IgnoreCopDirectives: false IgnoredPatterns: [] Metrics/MethodLength: Description: Avoid methods longer than 10 lines of code. StyleGuide: "#short-methods" Enabled: true CountComments: false Max: 10 Metrics/ParameterLists: Description: Avoid parameter lists longer than three or four parameters. StyleGuide: "#too-many-params" Enabled: true Max: 5 CountKeywordArgs: true Lint/AmbiguousBlockAssociation: Description: Checks for ambiguous block association with method when param passed without parentheses. StyleGuide: "#syntax" Enabled: true Lint/AmbiguousOperator: Description: Checks for ambiguous operators in the first argument of a method invocation without parentheses. StyleGuide: "#method-invocation-parens" Enabled: true Lint/AssignmentInCondition: Description: Don't use assignment in conditions. StyleGuide: "#safe-assignment-in-condition" Enabled: true AllowSafeAssignment: true Lint/ConditionPosition: Description: Checks for condition placed in a confusing position relative to the keyword. StyleGuide: "#same-line-condition" Enabled: true Lint/EnsureReturn: Description: Do not use return in an ensure block. StyleGuide: "#no-return-ensure" Enabled: true Lint/HandleExceptions: Description: Don't suppress exception. StyleGuide: "#dont-hide-exceptions" Enabled: true Lint/Loop: Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests. StyleGuide: "#loop-with-break" Enabled: true Lint/NestedMethodDefinition: Description: Do not use nested method definitions. StyleGuide: "#no-nested-methods" Enabled: true Lint/ParenthesesAsGroupedExpression: Description: Checks for method calls with a space before the opening parenthesis. StyleGuide: "#parens-no-spaces" Enabled: true Lint/RescueException: Description: Avoid rescuing the Exception class. StyleGuide: "#no-blind-rescues" Enabled: true Lint/RescueWithoutErrorClass: Description: Avoid rescuing without specifying an error class. StyleGuide: "#no-blind-rescues" Enabled: true Lint/StringConversionInInterpolation: Description: Checks for Object#to_s usage in string interpolation. StyleGuide: "#no-to-s" Enabled: true Lint/UnusedBlockArgument: Description: Checks for unused block arguments. StyleGuide: "#underscore-unused-vars" Enabled: true IgnoreEmptyBlocks: true AllowUnusedKeywordArguments: false Lint/UnusedMethodArgument: Description: Checks for unused method arguments. StyleGuide: "#underscore-unused-vars" Enabled: true AllowUnusedKeywordArguments: false IgnoreEmptyMethods: true Lint/UselessAssignment: Description: Checks for useless assignment to a local variable. StyleGuide: "#underscore-unused-vars" Enabled: true Performance/HashEachMethods: Description: Use `Hash#each_key` and `Hash#each_value` instead of `Hash#keys.each` and `Hash#values.each`. StyleGuide: "#hash-each" Enabled: true AutoCorrect: false