config/upstream.yml in cookstyle-6.2.9 vs config/upstream.yml in cookstyle-6.3.4

- old
+ new

@@ -95,10 +95,18 @@ # in this file are enabled by default. Cops can still be disabled in user configuration. # Note that it is invalid to set both EnabledByDefault and DisabledByDefault # to true in the same configuration. EnabledByDefault: false DisabledByDefault: false + # New cops introduced between major versions are set to a special pending status + # and are not enabled by default with warning message. + # Change this behavior by overriding either `NewCops: enable` or `NewCops: disable`. + # When `NewCops` is `enable`, pending cops are enabled in bulk. Can be overridden by + # the `--enable-pending-cops` command-line option. + # When `NewCops` is `disable`, pending cops are disabled in bulk. Can be overridden by + # the `--disable-pending-cops` command-line option. + NewCops: pending # Enables the result cache if `true`. Can be overridden by the `--cache` command # line option. UseCache: true # Threshold for how many files can be stored in the result cache before some # of the files are automatically removed. @@ -123,11 +131,11 @@ # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine # the desired version of Ruby by inspecting the .ruby-version file first, # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version # is specified in the Gemfile or gems.rb file, RuboCop reads the final value # from the lock file.) If the Ruby version is still unresolved, RuboCop will - # use the oldest officially supported Ruby version (currently Ruby 2.3). + # use the oldest officially supported Ruby version (currently Ruby 2.4). TargetRubyVersion: ~ #################### Bundler ############################### Bundler/DuplicatedGem: @@ -791,10 +799,26 @@ - indented_internal_methods Reference: # A reference to `EnforcedStyle: indented_internal_methods`. - https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions +Layout/IndentationStyle: + Description: 'Consistent indentation either with tabs only or spaces only.' + StyleGuide: '#spaces-indentation' + Enabled: true + VersionAdded: '0.49' + VersionChanged: '0.82' + # By default, the indentation width from Layout/IndentationWidth is used + # But it can be overridden by setting this parameter + # It is used during auto-correction to determine how many spaces should + # replace each tab. + IndentationWidth: ~ + EnforcedStyle: spaces + SupportedStyles: + - spaces + - tabs + Layout/IndentationWidth: Description: 'Use 2 spaces for indentation.' StyleGuide: '#spaces-indentation' Enabled: true VersionAdded: '0.49' @@ -1078,10 +1102,15 @@ Layout/SpaceAroundKeyword: Description: 'Use a space around keywords if appropriate.' Enabled: true VersionAdded: '0.49' +Layout/SpaceAroundMethodCallOperator: + Description: 'Checks method call operators to not have spaces around them.' + Enabled: pending + VersionAdded: '0.82' + Layout/SpaceAroundOperators: Description: 'Use a single space around operators.' StyleGuide: '#spaces-operators' Enabled: true VersionAdded: '0.49' @@ -1248,22 +1277,10 @@ EnforcedStyle: no_space SupportedStyles: - space - no_space -Layout/Tab: - Description: 'No hard tabs.' - StyleGuide: '#spaces-indentation' - Enabled: true - VersionAdded: '0.49' - VersionChanged: '0.51' - # By default, the indentation width from Layout/IndentationWidth is used - # But it can be overridden by setting this parameter - # It is used during auto-correction to determine how many spaces should - # replace each tab. - IndentationWidth: ~ - Layout/TrailingEmptyLines: Description: 'Checks trailing blank lines and final newline.' StyleGuide: '#newline-eof' Enabled: true VersionAdded: '0.49' @@ -1565,10 +1582,12 @@ Lint/RaiseException: Description: Checks for `raise` or `fail` statements which are raising `Exception` class. StyleGuide: '#raise-exception' Enabled: pending VersionAdded: '0.81' + AllowedImplicitNamespaces: + - 'Gem' Lint/RandOne: Description: >- Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake. @@ -2407,10 +2426,19 @@ Style/CaseEquality: Description: 'Avoid explicit use of the case equality operator(===).' StyleGuide: '#no-case-equality' Enabled: true VersionAdded: '0.9' + # If AllowOnConstant is enabled, the cop will ignore violations when the receiver of + # the case equality operator is a constant. + # + # # bad + # /string/ === "string" + # + # # good + # String === "string" + AllowOnConstant: false Style/CharacterLiteral: Description: 'Checks for uses of character literals.' StyleGuide: '#no-character-literals' Enabled: true @@ -2447,10 +2475,11 @@ - nested - compact Style/ClassCheck: Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.' + StyleGuide: '#is-a-vs-kind-of' Enabled: true VersionAdded: '0.24' EnforcedStyle: is_a? SupportedStyles: - is_a? @@ -2614,10 +2643,16 @@ Use the `__dir__` method to retrieve the canonicalized absolute path to the current file. Enabled: true VersionAdded: '0.50' +Style/DisableCopsWithinSourceCodeDirective: + Description: >- + Forbids disabling/enabling cops within source code. + Enabled: false + VersionAdded: '0.82' + Style/Documentation: Description: 'Document classes and non-namespace modules.' Enabled: true VersionAdded: '0.9' Exclude: @@ -2731,9 +2766,20 @@ Style/ExpandPathArguments: Description: "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`." Enabled: true VersionAdded: '0.53' + +Style/ExponentialNotation: + Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).' + StyleGuide: '#exponential-notation' + Enabled: pending + VersionAdded: '0.82' + EnforcedStyle: scientific + SupportedStyles: + - scientific + - engineering + - integral Style/FloatDivision: Description: 'For performing float division, coerce one side only.' StyleGuide: '#float-division' Reference: 'https://github.com/rubocop-hq/ruby-style-guide/issues/628'