diff --git a/.rubocop.yml b/.rubocop.yml index 88c3728d..e07814e4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,7 +21,7 @@ Lint/AssignmentInCondition: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition' Enabled: true -Lint/BlockAlignment: +Layout/BlockAlignment: Description: 'Align block ends correctly.' Enabled: true @@ -29,7 +29,7 @@ Lint/CircularArgumentReference: Description: "Don't refer to the keyword argument in the default value." Enabled: true -Lint/ConditionPosition: +Layout/ConditionPosition: Description: >- Checks for condition placed in a confusing position relative to the keyword. @@ -40,7 +40,7 @@ Lint/Debugger: Description: 'Check for debugger calls.' Enabled: true -Lint/DefEndAlignment: +Layout/DefEndAlignment: Description: 'Align ends corresponding to defs correctly.' Enabled: true @@ -68,7 +68,7 @@ Lint/EmptyInterpolation: Description: 'Checks for empty string interpolation.' Enabled: true -Lint/EndAlignment: +Layout/EndAlignment: Description: 'Align ends correctly.' Enabled: true @@ -81,7 +81,7 @@ Lint/EnsureReturn: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure' Enabled: true -Lint/Eval: +Security/Eval: Description: 'The use of eval represents a serious security risk.' Enabled: true @@ -89,7 +89,7 @@ Lint/FormatParameterMismatch: Description: 'The number of parameters to format/sprint must match the fields.' Enabled: true -Lint/HandleExceptions: +Lint/SuppressedException: Description: "Don't suppress exception." StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions' Enabled: true @@ -100,7 +100,7 @@ Lint/InvalidCharacterLiteral: whitespace character. Enabled: true -Lint/LiteralInCondition: +Lint/LiteralAsCondition: Description: 'Checks of literals used in conditions.' Enabled: true @@ -148,7 +148,7 @@ Lint/ShadowingOuterLocalVariable: for block arguments or block local variables. Enabled: true -Lint/StringConversionInInterpolation: +Lint/RedundantStringCoercion: Description: 'Checks for Object#to_s usage in string interpolation.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s' Enabled: true @@ -157,7 +157,7 @@ Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: true -Lint/UnneededDisable: +Lint/RedundantCopDisableDirective: Description: >- Checks for rubocop:disable comments that can be removed. Note: this cop is not disabled when disabling all cops. @@ -230,7 +230,7 @@ Metrics/CyclomaticComplexity: of test cases needed to validate a method. Enabled: true -Metrics/LineLength: +Layout/LineLength: Description: 'Limit lines to 80 characters.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits' Enabled: false @@ -367,12 +367,12 @@ Rails/Validation: ################## Style ################################# -Style/AccessModifierIndentation: +Layout/AccessModifierIndentation: Description: Check indentation of private/protected visibility modifiers. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected' Enabled: false -Style/AccessorMethodName: +Naming/AccessorMethodName: Description: Check the naming of accessor methods for get_/set_. Enabled: false @@ -381,20 +381,20 @@ Style/Alias: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method' Enabled: false -Style/AlignArray: +Layout/ArrayAlignment: Description: >- Align the elements of an array literal if they span more than one line. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays' Enabled: false -Style/AlignHash: +Layout/HashAlignment: Description: >- Align the elements of a hash literal if they span more than one line. Enabled: false -Style/AlignParameters: +Layout/ParameterAlignment: Description: >- Align the parameters of a method call if they span more than one line. @@ -416,7 +416,7 @@ Style/AsciiComments: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments' Enabled: false -Style/AsciiIdentifiers: +Naming/AsciiIdentifiers: Description: 'Use only ascii symbols in identifiers.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers' Enabled: false @@ -441,7 +441,7 @@ Style/BlockComments: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments' Enabled: false -Style/BlockEndNewline: +Layout/BlockEndNewline: Description: 'Put end statement of multiline block on its own line.' Enabled: false @@ -462,7 +462,7 @@ Style/CaseEquality: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality' Enabled: false -Style/CaseIndentation: +Layout/CaseIndentation: Description: 'Indentation of when in a case/when/[else/]end.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case' Enabled: false @@ -472,7 +472,7 @@ Style/CharacterLiteral: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals' Enabled: false -Style/ClassAndModuleCamelCase: +Naming/ClassAndModuleCamelCase: Description: 'Use CamelCase for classes and modules.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes' Enabled: false @@ -495,7 +495,7 @@ Style/ClassVars: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars' Enabled: false -Style/ClosingParenthesisIndentation: +Layout/ClosingParenthesisIndentation: Description: 'Checks the indentation of hanging closing parentheses.' Enabled: false @@ -514,11 +514,11 @@ Style/CommentAnnotation: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords' Enabled: false -Style/CommentIndentation: +Layout/CommentIndentation: Description: 'Indentation of comments.' Enabled: false -Style/ConstantName: +Naming/ConstantName: Description: 'Constants should use SCREAMING_SNAKE_CASE.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case' Enabled: false @@ -537,7 +537,7 @@ Style/Documentation: Description: 'Document classes and non-namespace modules.' Enabled: false -Style/DotPosition: +Layout/DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains' Enabled: false @@ -551,7 +551,7 @@ Style/EachWithObject: Description: 'Prefer `each_with_object` over `inject` or `reduce`.' Enabled: false -Style/ElseAlignment: +Layout/ElseAlignment: Description: 'Align elses and elsifs correctly.' Enabled: false @@ -559,32 +559,32 @@ Style/EmptyElse: Description: 'Avoid empty else-clauses.' Enabled: false -Style/EmptyLineBetweenDefs: +Layout/EmptyLineBetweenDefs: Description: 'Use empty lines between defs.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods' Enabled: false -Style/EmptyLines: +Layout/EmptyLines: Description: "Don't use several empty lines in a row." Enabled: false -Style/EmptyLinesAroundAccessModifier: +Layout/EmptyLinesAroundAccessModifier: Description: "Keep blank lines around access modifiers." Enabled: false -Style/EmptyLinesAroundBlockBody: +Layout/EmptyLinesAroundBlockBody: Description: "Keeps track of empty lines around block bodies." Enabled: false -Style/EmptyLinesAroundClassBody: +Layout/EmptyLinesAroundClassBody: Description: "Keeps track of empty lines around class bodies." Enabled: false -Style/EmptyLinesAroundModuleBody: +Layout/EmptyLinesAroundModuleBody: Description: "Keeps track of empty lines around module bodies." Enabled: false -Style/EmptyLinesAroundMethodBody: +Layout/EmptyLinesAroundMethodBody: Description: "Keeps track of empty lines around method bodies." Enabled: false @@ -598,7 +598,7 @@ Style/EndBlock: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks' Enabled: false -Style/EndOfLine: +Layout/EndOfLine: Description: 'Use Unix-style line endings.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf' Enabled: false @@ -608,25 +608,25 @@ Style/EvenOdd: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods' Enabled: false -Style/ExtraSpacing: +Layout/ExtraSpacing: Description: 'Do not use unnecessary spacing.' Enabled: false -Style/FileName: +Naming/FileName: Description: 'Use snake_case for source file names.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files' Enabled: false -Style/InitialIndentation: +Layout/InitialIndentation: Description: >- Checks the indentation of the first non-blank non-comment line in a file. Enabled: false -Style/FirstParameterIndentation: +Layout/FirstArgumentIndentation: Description: 'Checks the indentation of the first parameter in a method call.' Enabled: false -Style/FlipFlop: +Lint/FlipFlop: Description: 'Checks for flip flops' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops' Enabled: false @@ -671,22 +671,22 @@ Style/IfWithSemicolon: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs' Enabled: false -Style/IndentationConsistency: +Layout/IndentationConsistency: Description: 'Keep indentation straight.' Enabled: false -Style/IndentationWidth: +Layout/IndentationWidth: Description: 'Use 2 spaces for indentation.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation' Enabled: false -Style/IndentArray: +Layout/IndentArray: Description: >- Checks the indentation of the first element in an array literal. Enabled: false -Style/IndentHash: +Layout/IndentHash: Description: 'Checks the indentation of the first key in a hash literal.' Enabled: false @@ -705,7 +705,7 @@ Style/LambdaCall: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call' Enabled: false -Style/LeadingCommentSpace: +Layout/LeadingCommentSpace: Description: 'Comments should start with a space.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space' Enabled: false @@ -716,7 +716,7 @@ Style/LineEndConcatenation: line end. Enabled: false -Style/MethodCallParentheses: +Style/MethodCallWithoutArgsParentheses: Description: 'Do not use parentheses for method calls with no arguments.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens' Enabled: false @@ -728,7 +728,7 @@ Style/MethodDefParentheses: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens' Enabled: false -Style/MethodName: +Naming/MethodName: Description: 'Use the configured style when naming methods.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars' Enabled: false @@ -743,7 +743,7 @@ Style/MultilineBlockChain: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks' Enabled: false -Style/MultilineBlockLayout: +Layout/MultilineBlockLayout: Description: 'Ensures newlines after multiline block do statements.' Enabled: false @@ -752,7 +752,7 @@ Style/MultilineIfThen: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then' Enabled: false -Style/MultilineOperationIndentation: +Layout/MultilineOperationIndentation: Description: >- Checks indentation of binary operations that span more than one line. @@ -816,7 +816,7 @@ Style/OneLineConditional: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator' Enabled: false -Style/OpMethod: +Naming/BinaryOperatorParameterName: Description: 'When defining binary operators, name the argument other.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg' Enabled: false @@ -858,7 +858,7 @@ Style/PerlBackrefs: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers' Enabled: false -Style/PredicateName: +Naming/PredicateName: Description: 'Check the names of predicate methods.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark' Enabled: false @@ -898,7 +898,7 @@ Style/RegexpLiteral: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r' Enabled: false -Style/RescueEnsureAlignment: +Layout/RescueEnsureAlignment: Description: 'Align rescues and ensures correctly.' Enabled: false @@ -934,75 +934,75 @@ Style/SingleLineMethods: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods' Enabled: false -Style/SpaceBeforeFirstArg: +Layout/SpaceBeforeFirstArg: Description: >- Checks that exactly one space is used between a method name and the first argument for method calls without parentheses. Enabled: true -Style/SpaceAfterColon: +Layout/SpaceAfterColon: Description: 'Use spaces after colons.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators' Enabled: false -Style/SpaceAfterComma: +Layout/SpaceAfterComma: Description: 'Use spaces after commas.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators' Enabled: false -Style/SpaceAroundKeyword: +Layout/SpaceAroundKeyword: Description: 'Use spaces around keywords.' Enabled: false -Style/SpaceAfterMethodName: +Layout/SpaceAfterMethodName: Description: >- Do not put a space between a method name and the opening parenthesis in a method definition. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces' Enabled: false -Style/SpaceAfterNot: +Layout/SpaceAfterNot: Description: Tracks redundant space after the ! operator. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang' Enabled: false -Style/SpaceAfterSemicolon: +Layout/SpaceAfterSemicolon: Description: 'Use spaces after semicolons.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators' Enabled: false -Style/SpaceBeforeBlockBraces: +Layout/SpaceBeforeBlockBraces: Description: >- Checks that the left block brace has or doesn't have space before it. Enabled: false -Style/SpaceBeforeComma: +Layout/SpaceBeforeComma: Description: 'No spaces before commas.' Enabled: false -Style/SpaceBeforeComment: +Layout/SpaceBeforeComment: Description: >- Checks for missing space between code and a comment on the same line. Enabled: false -Style/SpaceBeforeSemicolon: +Layout/SpaceBeforeSemicolon: Description: 'No spaces before semicolons.' Enabled: false -Style/SpaceInsideBlockBraces: +Layout/SpaceInsideBlockBraces: Description: >- Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Enabled: false -Style/SpaceAroundBlockParameters: +Layout/SpaceAroundBlockParameters: Description: 'Checks the spacing inside and after block parameters pipes.' Enabled: false -Style/SpaceAroundEqualsInParameterDefault: +Layout/SpaceAroundEqualsInParameterDefault: Description: >- Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on @@ -1010,32 +1010,32 @@ Style/SpaceAroundEqualsInParameterDefault: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals' Enabled: false -Style/SpaceAroundOperators: +Layout/SpaceAroundOperators: Description: 'Use a single space around operators.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators' Enabled: false -Style/SpaceInsideBrackets: +Layout/SpaceInsideBrackets: Description: 'No spaces after [ or before ].' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces' Enabled: false -Style/SpaceInsideHashLiteralBraces: +Layout/SpaceInsideHashLiteralBraces: Description: "Use spaces inside hash literal braces - or don't." StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators' Enabled: false -Style/SpaceInsideParens: +Layout/SpaceInsideParens: Description: 'No spaces after ( or before ).' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces' Enabled: false -Style/SpaceInsideRangeLiteral: +Layout/SpaceInsideRangeLiteral: Description: 'No spaces inside range literals.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals' Enabled: false -Style/SpaceInsideStringInterpolation: +Layout/SpaceInsideStringInterpolation: Description: 'Checks for padding/surrounding spaces inside string interpolation.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation' Enabled: false @@ -1069,12 +1069,12 @@ Style/SymbolProc: Description: 'Use symbols as procs instead of blocks when possible.' Enabled: false -Style/Tab: +Layout/Tab: Description: 'No hard tabs.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation' Enabled: false -Style/TrailingBlankLines: +Layout/TrailingEmptyLines: Description: 'Checks trailing blank lines and final newline.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof' Enabled: false @@ -1089,7 +1089,7 @@ Style/TrailingCommaInLiteral: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' Enabled: false -Style/TrailingWhitespace: +Layout/TrailingWhitespace: Description: 'Avoid trailing whitespace.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace' Enabled: false @@ -1106,11 +1106,11 @@ Style/UnlessElse: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless' Enabled: false -Style/UnneededCapitalW: +Style/RedundantCapitalW: Description: 'Checks for %W when interpolation is not needed.' Enabled: false -Style/UnneededPercentQ: +Style/RedundantPercentQ: Description: 'Checks for %q/%Q when single quotes or double quotes would do.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q' Enabled: false @@ -1128,7 +1128,7 @@ Style/VariableInterpolation: StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate' Enabled: false -Style/VariableName: +Naming/VariableName: Description: 'Use the configured style when naming variables.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars' Enabled: false