config/enabled.yml in rubocop-0.52.1 vs config/enabled.yml in rubocop-0.53.0

- old
+ new

@@ -4,28 +4,31 @@ Bundler/DuplicatedGem: Description: 'Checks for duplicate gem entries in Gemfile.' Enabled: true Include: + - '**/*.gemfile' - '**/Gemfile' - '**/gems.rb' Bundler/InsecureProtocolSource: Description: >- The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. Enabled: true Include: + - '**/*.gemfile' - '**/Gemfile' - '**/gems.rb' Bundler/OrderedGems: Description: >- Gems within groups in the Gemfile should be alphabetically sorted. Enabled: true Include: + - '**/*.gemfile' - '**/Gemfile' - '**/gems.rb' #################### Gemspec ############################### @@ -73,10 +76,14 @@ Align the parameters of a method call if they span more than one line. StyleGuide: '#no-double-indent' Enabled: true +Layout/BlockAlignment: + Description: 'Align block ends correctly.' + Enabled: true + Layout/BlockEndNewline: Description: 'Put end statement of multiline block on its own line.' Enabled: true Layout/CaseIndentation: @@ -90,19 +97,34 @@ Layout/CommentIndentation: Description: 'Indentation of comments.' Enabled: true +Layout/ConditionPosition: + Description: >- + Checks for condition placed in a confusing position relative to + the keyword. + StyleGuide: '#same-line-condition' + Enabled: true + +Layout/DefEndAlignment: + Description: 'Align ends corresponding to defs correctly.' + Enabled: true + Layout/DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' StyleGuide: '#consistent-multi-line-chains' Enabled: true Layout/ElseAlignment: Description: 'Align elses and elsifs correctly.' Enabled: true +Layout/EmptyComment: + Description: 'Checks empty comment.' + 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 @@ -153,10 +175,14 @@ Layout/EmptyLinesAroundModuleBody: Description: "Keeps track of empty lines around module bodies." StyleGuide: '#empty-lines-around-bodies' Enabled: true +Layout/EndAlignment: + Description: 'Align ends correctly.' + Enabled: true + Layout/EndOfLine: Description: 'Use Unix-style line endings.' StyleGuide: '#crlf' Enabled: true @@ -419,37 +445,26 @@ Lint/AssignmentInCondition: Description: "Don't use assignment in conditions." StyleGuide: '#safe-assignment-in-condition' Enabled: true -Lint/BlockAlignment: - Description: 'Align block ends correctly.' +Lint/BigDecimalNew: + Description: '`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead.' Enabled: true Lint/BooleanSymbol: Description: 'Check for `:true` and `:false` symbols.' Enabled: true Lint/CircularArgumentReference: Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument." Enabled: true -Lint/ConditionPosition: - Description: >- - Checks for condition placed in a confusing position relative to - the keyword. - StyleGuide: '#same-line-condition' - Enabled: true - Lint/Debugger: Description: 'Check for debugger calls.' Enabled: true -Lint/DefEndAlignment: - Description: 'Align ends corresponding to defs correctly.' - Enabled: true - Lint/DeprecatedClassMethods: Description: 'Check for deprecated class method calls.' Enabled: true Lint/DuplicateCaseCondition: @@ -487,14 +502,10 @@ Lint/EmptyWhen: Description: 'Checks for `when` branches with empty bodies.' Enabled: true -Lint/EndAlignment: - Description: 'Align ends correctly.' - Enabled: true - Lint/EndInMethod: Description: 'END blocks should not be placed inside method definitions.' Enabled: true Lint/EnsureReturn: @@ -577,10 +588,14 @@ Lint/NonLocalExitFromIterator: Description: 'Do not use return in iterator to cause non-local exit.' Enabled: true +Lint/OrderedMagicComments: + Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.' + Enabled: true + Lint/ParenthesesAsGroupedExpression: Description: >- Checks for method calls with a space before the opening parenthesis. StyleGuide: '#parens-no-spaces' @@ -674,17 +689,22 @@ Lint/UnifiedInteger: Description: 'Use Integer instead of Fixnum or Bignum' Enabled: true -Lint/UnneededDisable: +Lint/UnneededCopDisableDirective: Description: >- Checks for rubocop:disable comments that can be removed. Note: this cop is not disabled when disabling all cops. It must be explicitly disabled. Enabled: true +Lint/UnneededCopEnableDirective: + Description: Checks for rubocop:enable comments that can be removed. + + Enabled: true + Lint/UnneededRequireStatement: Description: 'Checks for unnecessary `require` statement.' Enabled: true Lint/UnneededSplatExpansion: @@ -839,20 +859,37 @@ Naming/HeredocDelimiterNaming: Description: 'Use descriptive heredoc delimiters.' StyleGuide: '#heredoc-delimiters' Enabled: true +Naming/MemoizedInstanceVariableName: + Description: >- + Memoized method name should match memo instance variable name. + Enabled: true + Naming/MethodName: Description: 'Use the configured style when naming methods.' StyleGuide: '#snake-case-symbols-methods-vars' Enabled: true Naming/PredicateName: Description: 'Check the names of predicate methods.' StyleGuide: '#bool-methods-qmark' Enabled: true +Naming/UncommunicativeBlockParamName: + Description: >- + Checks for block parameter names that contain capital letters, + end in numbers, or do not meet a minimal length. + Enabled: true + +Naming/UncommunicativeMethodParamName: + Description: >- + Checks for method parameter names that contain capital letters, + end in numbers, or do not meet a minimal length. + Enabled: true + Naming/VariableName: Description: 'Use the configured style when naming variables.' StyleGuide: '#snake-case-symbols-methods-vars' Enabled: true @@ -937,18 +974,10 @@ # If enabled, this cop will warn about usages of # `flatten` being called without any parameters. # This can be dangerous since `flat_map` will only flatten 1 level, and # `flatten` without any parameters can flatten multiple levels. -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 - Performance/LstripRstrip: Description: 'Use `strip` instead of `lstrip.rstrip`.' Enabled: true Performance/RangeInclude: @@ -1035,10 +1064,17 @@ Rails/ActionFilter: Description: 'Enforces consistent use of action filter methods.' Enabled: true +Rails/ActiveRecordAliases: + Description: >- + Avoid Active Record aliases: + Use `update` instead of `update_attributes`. + Use `update!` instead of `update_attributes!`. + Enabled: true + Rails/ActiveSupportAliases: Description: >- Avoid ActiveSupport aliases of standard ruby methods: `String#starts_with?`, `String#ends_with?`, `Array#append`, `Array#prepend`. @@ -1251,10 +1287,14 @@ Avoid using of `Marshal.load` or `Marshal.restore` due to potential security issues. See reference for more information. Reference: 'http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations' Enabled: true +Security/Open: + Description: 'The use of Kernel#open represents a serious security risk.' + Enabled: true + Security/YAMLLoad: Description: >- Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security issues. See reference for more information. Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security' @@ -1463,10 +1503,14 @@ Style/EvenOdd: Description: 'Favor the use of Integer#even? && Integer#odd?' StyleGuide: '#predicate-methods' Enabled: true +Style/ExpandPathArguments: + Description: "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`." + Enabled: true + Style/FlipFlop: Description: 'Checks for flip flops' StyleGuide: '#no-flip-flops' Enabled: true @@ -1898,21 +1942,33 @@ Style/TernaryParentheses: Description: 'Checks for use of parentheses around ternary conditions.' Enabled: true +Style/TrailingBodyOnClass: + Description: 'Class body goes below class statement.' + Enabled: true + Style/TrailingBodyOnMethodDefinition: Description: 'Method body goes below definition.' Enabled: true +Style/TrailingBodyOnModule: + Description: 'Module body goes below module statement.' + Enabled: true + Style/TrailingCommaInArguments: Description: 'Checks for trailing comma in argument lists.' StyleGuide: '#no-trailing-params-comma' Enabled: true -Style/TrailingCommaInLiteral: - Description: 'Checks for trailing comma in array and hash literals.' +Style/TrailingCommaInArrayLiteral: + Description: 'Checks for trailing comma in array literals.' StyleGuide: '#no-trailing-array-commas' + Enabled: true + +Style/TrailingCommaInHashLiteral: + Description: 'Checks for trailing comma in hash literals.' Enabled: true Style/TrailingMethodEndStatement: Description: 'Checks for trailing end statement on line of method body.' Enabled: true