chefstyle 1.5.2 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbf6452b0cab1ef46383080fe18fa78d21aa00066abc1df2bbc0705a6721d753
4
- data.tar.gz: be21de8c4bc2f9681e8da6f23f0cff755e50b4a4300e84b03df4d2bbd92f829a
3
+ metadata.gz: 5eafee1ab58f15782ca6a720315f9502822f1d0e63e07d33e271d987bad49c64
4
+ data.tar.gz: 0004d5f5a676d1801b4b2e6fb786e026874261ef9f636660eb3e3403cbed5108
5
5
  SHA512:
6
- metadata.gz: e77886f2e3067aa56a3202803dba4ac0d5f18533f0dc2d65c0bc5431fe17be09e9a00126f157bfb12d81649c4001a4d4eb2420ef672f80af28c7ec719d6dd0e7
7
- data.tar.gz: dbb8488366023a4d1986e5694cb7a09b38683b5392d8e6ca4a520cdd11b1bc73597a46b5af180aba81cd20e8e96dffcd0dd19bf545221feab9a54f9d121415e6
6
+ metadata.gz: 6d5c292f15541edf15ecdaea4d135b893550a28ca242b449fa7c05c74644b98d3c8927db666d46f6d30c63be5521dbb58fd7b740d753a7bd38baf651386c2ace
7
+ data.tar.gz: ba0275de1384c823209345d28ff82ab5ef484371491334a1aa110bb86abfc9a61f0795295aaa1b402d0b9bb5fb7ec34038fed04b4000f605f45ce2808eabb6dd
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.4
3
+ SuggestExtensions: false
3
4
 
4
5
  #
5
6
  # Bundler
@@ -243,6 +244,7 @@ Layout/EmptyLineAfterGuardClause:
243
244
  Enabled: true
244
245
  Layout/EmptyLineBetweenDefs:
245
246
  Enabled: true
247
+ AllowAdjacentOneLineDefs: true
246
248
  Layout/EmptyLines:
247
249
  Enabled: true
248
250
  Layout/EmptyLinesAroundAccessModifier:
@@ -393,6 +393,8 @@ Lint/TrailingCommaInAttributeDeclaration:
393
393
  Enabled: false
394
394
  Lint/UnderscorePrefixedVariableName:
395
395
  Enabled: false
396
+ Lint/UnexpectedBlockArity:
397
+ Enabled: false
396
398
  Lint/UnifiedInteger:
397
399
  Enabled: false
398
400
  Lint/UnmodifiedReduceAccumulator:
@@ -755,6 +757,8 @@ Style/RaiseArgs:
755
757
  Enabled: false
756
758
  Style/RandomWithOffset:
757
759
  Enabled: false
760
+ Style/RedundantArgument:
761
+ Enabled: false
758
762
  Style/RedundantBegin:
759
763
  Enabled: false
760
764
  Style/RedundantCapitalW:
@@ -139,6 +139,16 @@ AllCops:
139
139
  # from the lock file.) If the Ruby version is still unresolved, RuboCop will
140
140
  # use the oldest officially supported Ruby version (currently Ruby 2.4).
141
141
  TargetRubyVersion: ~
142
+ # Determines if a notification for extension libraries should be shown when
143
+ # rubocop is run. Keys are the name of the extension, and values are an array
144
+ # of gems in the Gemfile that the extension is suggested for, if not already
145
+ # included.
146
+ SuggestExtensions:
147
+ rubocop-rails: [rails]
148
+ rubocop-rspec: [rspec, rspec-rails]
149
+ rubocop-minitest: [minitest]
150
+ rubocop-sequel: [sequel]
151
+ rubocop-rake: [rake]
142
152
 
143
153
  #################### Bundler ###############################
144
154
 
@@ -459,10 +469,14 @@ Layout/EmptyLineAfterMultilineCondition:
459
469
  - https://github.com/airbnb/ruby#multiline-if-newline
460
470
 
461
471
  Layout/EmptyLineBetweenDefs:
462
- Description: 'Use empty lines between defs.'
472
+ Description: 'Use empty lines between class/module/method defs.'
463
473
  StyleGuide: '#empty-lines-between-methods'
464
474
  Enabled: true
465
475
  VersionAdded: '0.49'
476
+ VersionChanged: '1.4'
477
+ EmptyLineBetweenMethodDefs: true
478
+ EmptyLineBetweenClassDefs: true
479
+ EmptyLineBetweenModuleDefs: true
466
480
  # If `true`, this parameter means that single line method definitions don't
467
481
  # need an empty line between them.
468
482
  AllowAdjacentOneLineDefs: false
@@ -891,8 +905,8 @@ Layout/LineLength:
891
905
  StyleGuide: '#max-line-length'
892
906
  Enabled: true
893
907
  VersionAdded: '0.25'
894
- VersionChanged: '1.3'
895
- AutoCorrect: false
908
+ VersionChanged: '1.4'
909
+ AutoCorrect: true
896
910
  Max: 120
897
911
  # To make it possible to copy or click on URIs in the code, we allow lines
898
912
  # containing a URI to be longer than Max.
@@ -1684,6 +1698,7 @@ Lint/MissingSuper:
1684
1698
  without calls to `super`'.
1685
1699
  Enabled: true
1686
1700
  VersionAdded: '0.89'
1701
+ VersionChanged: '1.4'
1687
1702
 
1688
1703
  Lint/MixedRegexpCaptureTypes:
1689
1704
  Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
@@ -1993,6 +2008,23 @@ Lint/UnderscorePrefixedVariableName:
1993
2008
  VersionAdded: '0.21'
1994
2009
  AllowKeywordBlockArguments: false
1995
2010
 
2011
+ Lint/UnexpectedBlockArity:
2012
+ Description: 'Looks for blocks that have fewer arguments that the calling method expects.'
2013
+ Enabled: pending
2014
+ Safe: false
2015
+ VersionAdded: '1.5'
2016
+ Methods:
2017
+ chunk_while: 2
2018
+ each_with_index: 2
2019
+ each_with_object: 2
2020
+ inject: 2
2021
+ max: 2
2022
+ min: 2
2023
+ minmax: 2
2024
+ reduce: 2
2025
+ slice_when: 2
2026
+ sort: 2
2027
+
1996
2028
  Lint/UnifiedInteger:
1997
2029
  Description: 'Use Integer instead of Fixnum or Bignum.'
1998
2030
  Enabled: true
@@ -2002,6 +2034,7 @@ Lint/UnmodifiedReduceAccumulator:
2002
2034
  Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
2003
2035
  Enabled: pending
2004
2036
  VersionAdded: '1.1'
2037
+ VersionChanged: '1.5'
2005
2038
 
2006
2039
  Lint/UnreachableCode:
2007
2040
  Description: 'Unreachable code.'
@@ -2105,21 +2138,23 @@ Metrics/AbcSize:
2105
2138
  - https://en.wikipedia.org/wiki/ABC_Software_Metric
2106
2139
  Enabled: true
2107
2140
  VersionAdded: '0.27'
2108
- VersionChanged: '0.81'
2141
+ VersionChanged: '1.5'
2109
2142
  # The ABC size is a calculated magnitude, so this number can be an Integer or
2110
2143
  # a Float.
2111
2144
  IgnoredMethods: []
2145
+ CountRepeatedAttributes: true
2112
2146
  Max: 17
2113
2147
 
2114
2148
  Metrics/BlockLength:
2115
2149
  Description: 'Avoid long blocks with many lines.'
2116
2150
  Enabled: true
2117
2151
  VersionAdded: '0.44'
2118
- VersionChanged: '0.87'
2152
+ VersionChanged: '1.5'
2119
2153
  CountComments: false # count full line comments?
2120
2154
  Max: 25
2121
2155
  CountAsOne: []
2122
- ExcludedMethods:
2156
+ ExcludedMethods: [] # deprecated, retained for backwards compatibility
2157
+ IgnoredMethods:
2123
2158
  # By default, exclude the `#refine` method, as it tends to have larger
2124
2159
  # associated blocks.
2125
2160
  - refine
@@ -2160,11 +2195,12 @@ Metrics/MethodLength:
2160
2195
  StyleGuide: '#short-methods'
2161
2196
  Enabled: true
2162
2197
  VersionAdded: '0.25'
2163
- VersionChanged: '0.87'
2198
+ VersionChanged: '1.5'
2164
2199
  CountComments: false # count full line comments?
2165
2200
  Max: 10
2166
2201
  CountAsOne: []
2167
- ExcludedMethods: []
2202
+ ExcludedMethods: [] # deprecated, retained for backwards compatibility
2203
+ IgnoredMethods: []
2168
2204
 
2169
2205
  Metrics/ModuleLength:
2170
2206
  Description: 'Avoid modules longer than 100 lines of code.'
@@ -2180,8 +2216,10 @@ Metrics/ParameterLists:
2180
2216
  StyleGuide: '#too-many-params'
2181
2217
  Enabled: true
2182
2218
  VersionAdded: '0.25'
2219
+ VersionChanged: '1.5'
2183
2220
  Max: 5
2184
2221
  CountKeywordArgs: true
2222
+ MaxOptionalParameters: 3
2185
2223
 
2186
2224
  Metrics/PerceivedComplexity:
2187
2225
  Description: >-
@@ -2451,7 +2489,7 @@ Naming/VariableNumber:
2451
2489
  StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
2452
2490
  Enabled: true
2453
2491
  VersionAdded: '0.50'
2454
- VersionChanged: '1.3'
2492
+ VersionChanged: '1.4'
2455
2493
  EnforcedStyle: normalcase
2456
2494
  SupportedStyles:
2457
2495
  - snake_case
@@ -2459,7 +2497,13 @@ Naming/VariableNumber:
2459
2497
  - non_integer
2460
2498
  CheckMethodNames: true
2461
2499
  CheckSymbols: true
2462
- AllowedIdentifiers: []
2500
+ AllowedIdentifiers:
2501
+ - capture3 # Open3.capture3
2502
+ - iso8601 # Time#iso8601
2503
+ - rfc1123_date # CGI.rfc1123_date
2504
+ - rfc822 # Time#rfc822
2505
+ - rfc2822 # Time#rfc2822
2506
+ - rfc3339 # DateTime.rfc3339
2463
2507
 
2464
2508
  #################### Security ##############################
2465
2509
 
@@ -3976,6 +4020,17 @@ Style/RandomWithOffset:
3976
4020
  Enabled: true
3977
4021
  VersionAdded: '0.52'
3978
4022
 
4023
+ Style/RedundantArgument:
4024
+ Description: 'Check for a redundant argument passed to certain methods.'
4025
+ Enabled: pending
4026
+ Safe: false
4027
+ VersionAdded: '1.4'
4028
+ Methods:
4029
+ # Array#join
4030
+ join: ''
4031
+ # String#split
4032
+ split: ' '
4033
+
3979
4034
  Style/RedundantAssignment:
3980
4035
  Description: 'Checks for redundant assignment before returning.'
3981
4036
  Enabled: true
@@ -4246,6 +4301,7 @@ Style/SoleNestedConditional:
4246
4301
  which can be merged into outer conditional node.
4247
4302
  Enabled: true
4248
4303
  VersionAdded: '0.89'
4304
+ VersionChanged: '1.5'
4249
4305
  AllowModifier: false
4250
4306
 
4251
4307
  Style/SpecialGlobalVars:
@@ -4378,7 +4434,7 @@ Style/SymbolProc:
4378
4434
  Enabled: true
4379
4435
  Safe: false
4380
4436
  VersionAdded: '0.26'
4381
- VersionChanged: '0.64'
4437
+ VersionChanged: '1.5'
4382
4438
  # A list of method names to be ignored by the check.
4383
4439
  # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
4384
4440
  IgnoredMethods:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "1.5.2"
4
- RUBOCOP_VERSION = "1.3.1"
3
+ VERSION = "1.5.6"
4
+ RUBOCOP_VERSION = "1.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chefstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2020-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.1
19
+ version: 1.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3.1
26
+ version: 1.5.0
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io