config/upstream.yml in cookstyle-7.25.10 vs config/upstream.yml in cookstyle-7.26.1

- old
+ new

@@ -76,10 +76,12 @@ # `-S/--display-style-guide` option. DisplayStyleGuide: false # When specifying style guide URLs, any paths and/or fragments will be # evaluated relative to the base URL. StyleGuideBaseURL: https://rubystyle.guide + # Documentation URLs will be constructed using the base URL. + DocumentationBaseURL: https://docs.rubocop.org/rubocop # Extra details are not displayed in offense messages by default. Change # behavior by overriding ExtraDetails, or by giving the # `-E/--extra-details` option. ExtraDetails: false # Additional cops that do not reference a style guide rule may be enabled by @@ -447,11 +449,15 @@ VersionAdded: '0.49' Layout/CommentIndentation: Description: 'Indentation of comments.' Enabled: true + # When true, allows comments to have extra indentation if that aligns them + # with a comment on the preceding line. + AllowForAlignment: false VersionAdded: '0.49' + VersionChanged: '1.24' Layout/ConditionPosition: Description: >- Checks for condition placed in a confusing position relative to the keyword. @@ -1794,11 +1800,13 @@ VersionAdded: '0.36' Lint/IncompatibleIoSelectWithFiberScheduler: Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.' Enabled: pending + SafeAutoCorrect: false VersionAdded: '1.21' + VersionChanged: '1.24' Lint/IneffectiveAccessModifier: Description: >- Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work. @@ -2477,10 +2485,20 @@ StyleGuide: '#other-arg' Enabled: true VersionAdded: '0.50' VersionChanged: '1.2' +Naming/BlockForwarding: + Description: 'Use anonymous block forwarding.' + StyleGuide: '#block-forwarding' + Enabled: pending + VersionAdded: '1.24' + EnforcedStyle: anonymous + SupportedStyles: + - anonymous + - explicit + Naming/BlockParameterName: Description: >- Checks for block parameter names that contain capital letters, end in numbers, or do not meet a minimal length. Enabled: true @@ -3490,10 +3508,22 @@ SupportedStyles: - scientific - engineering - integral +Style/FileRead: + Description: 'Favor `File.(bin)read` convenience methods.' + StyleGuide: '#file-read' + Enabled: pending + VersionAdded: '1.24' + +Style/FileWrite: + Description: 'Favor `File.(bin)write` convenience methods.' + StyleGuide: '#file-write' + Enabled: pending + VersionAdded: '1.24' + Style/FloatDivision: Description: 'For performing float division, coerce one side only.' StyleGuide: '#float-division' Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html' Enabled: true @@ -3648,21 +3678,28 @@ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. StyleGuide: '#hash-literals' Enabled: true VersionAdded: '0.9' - VersionChanged: '0.43' + VersionChanged: '1.24' EnforcedStyle: ruby19 SupportedStyles: # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys - ruby19 # checks for hash rocket syntax for all hashes - hash_rockets # forbids mixed key syntaxes (e.g. {a: 1, :b => 2}) - no_mixed_keys # enforces both ruby19 and no_mixed_keys styles - ruby19_no_mixed_keys + # Force hashes that have a hash value omission + EnforcedShorthandSyntax: always + SupportedShorthandSyntax: + # forces use of the 3.1 syntax (e.g. {foo:}) when the hash key and value are the same. + - always + # forces use of explicit hash literal value. + - never # Force hashes that have a symbol value to use hash rockets UseHashRocketsWithSymbolValues: false # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style PreferHashRocketsForNonAlnumEndingSymbols: false @@ -3835,10 +3872,16 @@ Enabled: true SafeAutoCorrect: false VersionAdded: '0.18' VersionChanged: '0.64' +Style/MapToHash: + Description: 'Prefer `to_h` with a block over `map.to_h`.' + Enabled: pending + VersionAdded: '1.24' + Safe: false + Style/MethodCallWithArgsParentheses: Description: 'Use parentheses for method calls with arguments.' StyleGuide: '#method-invocation-parens' Enabled: false VersionAdded: '0.47' @@ -4203,9 +4246,11 @@ Enabled: true VersionAdded: '0.9' VersionChanged: '0.48' MinDigits: 5 Strict: false + # You can specify allowed numbers. (e.g. port number 3000, 8080, and etc) + AllowedNumbers: [] Style/NumericPredicate: Description: >- Checks for the use of predicate- or comparison methods for numeric comparisons.