config/enabled.yml in rubocop-0.16.0 vs config/enabled.yml in rubocop-0.17.0

- old
+ new

@@ -11,62 +11,66 @@ Alias: Description: 'Use alias_method instead of alias.' Enabled: true AlignArray: - Description: > + Description: >- Align the elements of an array literal if they span more than one line. Enabled: true AlignHash: - Description: > + Description: >- Align the elements of a hash literal if they span more than one line. Enabled: true AlignParameters: - Description: > + Description: >- Align the parameters of a method call if they span more than one line. Enabled: true AndOr: Description: 'Use &&/|| instead of and/or.' Enabled: true -AsciiIdentifiers: - Description: 'Use only ascii symbols in identifiers.' - Enabled: true - AsciiComments: Description: 'Use only ascii symbols in comments.' Enabled: true +AsciiIdentifiers: + Description: 'Use only ascii symbols in identifiers.' + Enabled: true + Attr: Description: 'Checks for uses of Module#attr.' Enabled: true BeginBlock: Description: 'Avoid the use of BEGIN blocks.' Enabled: true -Blocks: - Description: > - Avoid using {...} for multi-line blocks (multiline chaining is - always ugly). - Prefer {...} over do...end for single-line blocks. - Enabled: true - BlockComments: Description: 'Do not use block comments.' Enabled: true BlockNesting: Description: 'Avoid excessive block nesting' Enabled: true +Blocks: + Description: >- + Avoid using {...} for multi-line blocks (multiline chaining is + always ugly). + Prefer {...} over do...end for single-line blocks. + Enabled: true + +BracesAroundHashParameters: + Description: 'Enforce braces style inside hash parameters.' + Enabled: true + CaseEquality: Description: 'Avoid explicit use of the case equality operator(===).' Enabled: true CaseIndentation: @@ -75,18 +79,18 @@ CharacterLiteral: Description: 'Checks for uses of character literals.' Enabled: true -ClassLength: - Description: 'Avoid classes longer than 100 lines of code.' - Enabled: true - ClassAndModuleCamelCase: Description: 'Use CamelCase for classes and modules.' Enabled: true +ClassLength: + Description: 'Avoid classes longer than 100 lines of code.' + Enabled: true + ClassMethods: Description: 'Use self when defining module/class methods.' Enabled: true ClassVars: @@ -99,10 +103,16 @@ ColonMethodCall: Description: 'Do not use :: for method call.' Enabled: true +CommentAnnotation: + Description: >- + Checks formatting of special comments + (TODO, FIXME, OPTIMIZE, HACK, REVIEW). + Enabled: true + ConstantName: Description: 'Constants should use SCREAMING_SNAKE_CASE.' Enabled: true CyclomaticComplexity: @@ -119,26 +129,26 @@ DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' Enabled: true +EmptyLineBetweenDefs: + Description: 'Use empty lines between defs.' + Enabled: true + EmptyLines: Description: "Don't use several empty lines in a row." Enabled: true EmptyLinesAroundAccessModifier: Description: "Keep blank lines around access modifiers." Enabled: true EmptyLinesAroundBody: - Description: "Keeps track of blank lines around expression bodies." + Description: "Keeps track of empty lines around expression bodies." Enabled: true -EmptyLineBetweenDefs: - Description: 'Use empty lines between defs.' - Enabled: true - EmptyLiteral: Description: 'Prefer literals to Array.new/Hash.new/String.new.' Enabled: true Encoding: @@ -151,18 +161,10 @@ EndOfLine: Description: 'Use Unix-style line endings.' Enabled: true -EnsureReturn: - Description: 'Never use return in an ensure block.' - Enabled: true - -Eval: - Description: 'The use of eval represents a serious security risk.' - Enabled: true - EvenOdd: Description: 'Favor the use of Fixnum#even? && Fixnum#odd?' Enabled: true FavorJoin: @@ -172,11 +174,11 @@ FavorSprintf: Description: 'Use sprintf instead of String#%.' Enabled: true FavorUnlessOverNegatedIf: - Description: > + Description: >- Favor unless over if for negative conditions (or control flow or). Enabled: true FavorUntilOverNegatedWhile: @@ -197,32 +199,32 @@ GlobalVars: Description: 'Do not introduce global variables.' Enabled: true -HandleExceptions: - Description: "Don't suppress exception." - Enabled: true - HashMethods: Description: 'Checks for use of deprecated Hash methods.' Enabled: true HashSyntax: - Description: > + Description: >- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. Enabled: true +IfUnlessModifier: + Description: >- + Favor modifier if/unless usage when you have a + single-line body. + Enabled: true + IfWithSemicolon: Description: 'Never use if x; .... Use the ternary operator instead.' Enabled: true -IfUnlessModifier: - Description: > - Favor modifier if/unless usage when you have a - single-line body. +IndentationConsistency: + Description: 'Keep indentation straight.' Enabled: true IndentationWidth: Description: 'Use 2 spaces for indentation.' Enabled: true @@ -233,30 +235,24 @@ LambdaCall: Description: 'Use lambda.call(...) instead of lambda.(...).' Enabled: true -LineLength: - Description: 'Limit lines to 79 characters.' - Enabled: true - LeadingCommentSpace: Description: 'Comments should start with a space.' Enabled: true -Loop: - Description: > - Use Kernel#loop with break rather than begin/end/until or - begin/end/while for post-loop tests. +LineLength: + Description: 'Limit lines to 79 characters.' Enabled: true MethodCallParentheses: Description: 'Do not use parentheses for method calls with no arguments.' Enabled: true MethodDefParentheses: - Description: > + Description: >- Checks if the method definitions have or don't have parentheses. Enabled: true MethodLength: @@ -278,11 +274,11 @@ MultilineIfThen: Description: 'Never use then for multi-line if/unless.' Enabled: true MultilineTernaryOperator: - Description: > + Description: >- Avoid multi-line ?: (the ternary operator); use if/unless instead. Enabled: true NestedTernaryOperator: @@ -296,17 +292,17 @@ Not: Description: 'Use ! instead of not.' Enabled: true NumericLiterals: - Description: > + Description: >- Add underscores to large numeric literals to improve their readability. Enabled: true OneLineConditional: - Description: > + Description: >- Favor the ternary operator(?:) over if/then/else/end constructs. Enabled: true OpMethod: @@ -316,11 +312,11 @@ ParameterLists: Description: 'Avoid parameter lists longer than three or four parameters.' Enabled: true ParenthesesAroundCondition: - Description: > + Description: >- Don't use parentheses around the condition of an if/unless/while. Enabled: true PerlBackrefs: @@ -345,34 +341,30 @@ RedundantException: Description: "Checks for an obsolete RuntimeException argument in raise/fail." Enabled: true -RedundantSelf: - Description: "Don't use self where it's not needed." - Enabled: true - RedundantReturn: Description: "Don't use return where it's not required." Enabled: true +RedundantSelf: + Description: "Don't use self where it's not needed." + Enabled: true + RegexpLiteral: - Description: > + Description: >- Use %r for regular expressions matching more than `MaxSlashes` '/' characters. Use %r only for regular expressions matching more than `MaxSlashes` '/' character. Enabled: true RescueModifier: Description: 'Avoid using rescue in its modifier form.' Enabled: true -RescueException: - Description: 'Avoid rescuing the Exception class.' - Enabled: true - Semicolon: Description: "Don't use semicolons to terminate expressions." Enabled: true SignalException: @@ -385,29 +377,10 @@ SingleLineMethods: Description: 'Avoid single-line methods.' Enabled: true -SpaceAroundOperators: - Description: 'Use spaces around operators.' - Enabled: true - -SpaceAroundBlockBraces: - 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: true - -SpaceInsideParens: - Description: 'No spaces after ( or before ).' - Enabled: true - -SpaceInsideBrackets: - Description: 'No spaces after [ or before ].' - Enabled: true - SpaceAfterColon: Description: 'Use spaces after colons.' Enabled: true SpaceAfterComma: @@ -417,11 +390,11 @@ SpaceAfterControlKeyword: Description: 'Use spaces after if/elsif/unless/while/until/case/when.' Enabled: true SpaceAfterMethodName: - Description: > + Description: >- Never put a space between a method name and the opening parenthesis. Enabled: true SpaceAfterNot: @@ -430,24 +403,43 @@ SpaceAfterSemicolon: Description: 'Use spaces after semicolons.' Enabled: true +SpaceAroundBlockBraces: + 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: true + SpaceAroundEqualsInParameterDefault: - Description: > + Description: >- Use spaces around the = operator when assigning default values in def params. Enabled: true +SpaceAroundOperators: + Description: 'Use spaces around operators.' + Enabled: true + SpaceBeforeModifierKeyword: Description: 'Put a space before the modifier keyword.' Enabled: true +SpaceInsideBrackets: + Description: 'No spaces after [ or before ].' + Enabled: true + SpaceInsideHashLiteralBraces: Description: "Use spaces inside hash literal braces - or don't." Enabled: true +SpaceInsideParens: + Description: 'No spaces after ( or before ).' + Enabled: true + SpecialGlobalVars: Description: 'Avoid Perl-style global variables.' Enabled: true StringLiterals: @@ -457,29 +449,33 @@ Tab: Description: 'No hard tabs.' Enabled: true TrailingBlankLines: - Description: 'Checks for superflous trailing blank lines.' + Description: 'Checks for superfluous trailing blank lines.' Enabled: true +TrailingComma: + Description: 'Checks for trailing comma in parameter lists and literals.' + Enabled: true + TrailingWhitespace: Description: 'Avoid trailing whitespace.' Enabled: true TrivialAccessors: Description: 'Prefer attr_* methods to trivial readers/writers.' Enabled: true UnlessElse: - Description: > + Description: >- Never use unless with else. Rewrite these with the positive case first. Enabled: true VariableInterpolation: - Description: > + Description: >- Don't interpolate global, instance and class variables directly in strings. Enabled: true VariableName: @@ -488,49 +484,59 @@ WhenThen: Description: 'Use when x then ... for one-line cases.' Enabled: true +WhileUntilDo: + Description: 'Checks for redundant do after while or until.' + Enabled: true + WhileUntilModifier: - Description: > + Description: >- Favor modifier while/until usage when you have a single-line body. Enabled: true WordArray: Description: 'Use %w or %W for arrays of words.' Enabled: true -WhileUntilDo: - Description: 'Checks for redundant do after while or until.' +#################### Lint ################################ +### Warnings + +AmbiguousOperator: + Description: >- + Checks for ambiguous operators in the first argument of a + method invocation without parentheses. Enabled: true -BracesAroundHashParameters: - Description: 'Enforce braces style inside hash parameters.' +AmbiguousRegexpLiteral: + Description: >- + Checks for ambiguous regexp literals in the first argument of + a method invocation without parenthesis. Enabled: true -#################### Lint ################################ -### Warnings - AssignmentInCondition: Description: "Don't use assignment in conditions." Enabled: true BlockAlignment: Description: 'Align block ends correctly.' Enabled: true -CommentAnnotation: - Description: > - Checks formatting of special comments - (TODO, FIXME, OPTIMIZE, HACK, REVIEW). +ConditionPosition: + Description: 'Checks for condition placed in a confusing position relative to the keyword.' Enabled: true Debugger: Description: 'Check for debugger calls.' Enabled: true +ElseLayout: + Description: 'Check for odd code arrangement in an else block.' + Enabled: true + EmptyEnsure: Description: 'Checks for empty ensure block.' Enabled: true EndAlignment: @@ -539,43 +545,71 @@ EndInMethod: Description: 'END blocks should not be placed inside method definitions.' Enabled: true +EnsureReturn: + Description: 'Never use return in an ensure block.' + Enabled: true + +Eval: + Description: 'The use of eval represents a serious security risk.' + Enabled: true + +HandleExceptions: + Description: "Don't suppress exception." + Enabled: true + +InvalidCharacterLiteral: + Description: >- + Checks for invalid character literals with a non-escaped + whitespace character. + Enabled: true + LiteralInCondition: Description: 'Checks of literals used in conditions.' Enabled: true +Loop: + Description: >- + Use Kernel#loop with break rather than begin/end/until or + begin/end/while for post-loop tests. + Enabled: true + ParenthesesAsGroupedExpression: - Description: > + Description: >- Checks for method calls with a space before the opening parenthesis. Enabled: true +RescueException: + Description: 'Avoid rescuing the Exception class.' + Enabled: true + ShadowingOuterLocalVariable: - Description: > + Description: >- Do not use the same name as outer local variable for block arguments or block local variables. Enabled: true -Syntax: - Description: 'Reports several basic syntax warnings and invalid syntaxes.' - Enabled: true - UnreachableCode: Description: 'Unreachable code.' Enabled: true UselessAssignment: Description: 'Checks for useless assignment to a local variable.' Enabled: true -UselessSetterCall: - Description: 'Checks for useless setter call to a local variable.' - Enabled: true - UselessComparison: Description: 'Checks for comparison of something with itself.' + Enabled: true + +UselessElseWithoutRescue: + Description: 'Checks for useless `else` in `begin..end` without `rescue`.' + Enabled: true + +UselessSetterCall: + Description: 'Checks for useless setter call to a local variable.' Enabled: true Void: Description: 'Possible use of operator/literal/variable in void context.' Enabled: true