chefstyle 1.7.1 → 2.0.4

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: 83ab4efcaac7ca6e5d7d3d2453685273ac015024fd39d0ef1db3a1f2a1e8d84f
4
- data.tar.gz: ba401d9837304e9327bd6c6749ffbdd34ba76790c967cb4dd6989fa2a354595c
3
+ metadata.gz: 24a70093af7e575252cbf8d6c0d791192b517d9d508b72697f43cb309471cfed
4
+ data.tar.gz: 39aff8e7080a8830d4f13f6d9d45e45d70ed7e179ca5c32b5a71c96b5e33de8c
5
5
  SHA512:
6
- metadata.gz: a6ec0f6ea2b3ec795bc4762b7944945754690babae83889a49f281b6683282653ec4b2cc955a0868ef13c6ee57451242c67e1fd07587a7222436bb1220a0c7c1
7
- data.tar.gz: d7ec55522948386fd693fda2c3c3a5e81b69c07217c0e42216374237da42f1aeedf30c2f3b8f176ee0f92e6202da094ad3996083c67511aa84dffedbf811a9a4
6
+ metadata.gz: fa0a29d52c983bc46dbcdb79ff2d1df62ef64104ff81fb7365df606dc38a7b86a721d53de2bb7c7a224417b9cfc5da5d511112530befe334a92927957a249786
7
+ data.tar.gz: 163fcb0121d79699af424ce281b30e2e89338b471770e7903514a3efde7b56fa7145c80807d42ab15331acf23c1fe738adf80a0998662c03750acae613ec9ff7
data/chefstyle.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{RuboCop configuration for Chef's ruby projects}
13
13
  spec.homepage = "https://github.com/chef/chefstyle"
14
14
  spec.license = "Apache-2.0"
15
- spec.required_ruby_version = ">= 2.4"
15
+ spec.required_ruby_version = ">= 2.5"
16
16
 
17
17
  spec.files = %w{LICENSE chefstyle.gemspec} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
18
18
  spec.executables = %w{chefstyle}
data/config/chefstyle.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.5
3
3
  SuggestExtensions: false
4
4
 
5
5
  #
@@ -5,6 +5,8 @@ Bundler/DuplicatedGem:
5
5
  Enabled: false
6
6
  Bundler/GemComment:
7
7
  Enabled: false
8
+ Bundler/GemVersion:
9
+ Enabled: false
8
10
  Bundler/InsecureProtocolSource:
9
11
  Enabled: false
10
12
  Bundler/OrderedGems:
@@ -147,8 +149,12 @@ Layout/MultilineOperationIndentation:
147
149
  Enabled: false
148
150
  Layout/ParameterAlignment:
149
151
  Enabled: false
152
+ Layout/RedundantLineBreak:
153
+ Enabled: false
150
154
  Layout/RescueEnsureAlignment:
151
155
  Enabled: false
156
+ Layout/SingleLineBlockChain:
157
+ Enabled: false
152
158
  Layout/SpaceAfterColon:
153
159
  Enabled: false
154
160
  Layout/SpaceAfterComma:
@@ -851,6 +857,8 @@ Style/StabbyLambdaParentheses:
851
857
  Enabled: false
852
858
  Style/StderrPuts:
853
859
  Enabled: false
860
+ Style/StringChars:
861
+ Enabled: false
854
862
  Style/StringConcatenation:
855
863
  Enabled: false
856
864
  Style/StringHashKeys:
@@ -875,6 +883,8 @@ Style/SymbolProc:
875
883
  Enabled: false
876
884
  Style/TernaryParentheses:
877
885
  Enabled: false
886
+ Style/TopLevelMethodDefinition:
887
+ Enabled: false
878
888
  Style/TrailingBodyOnClass:
879
889
  Enabled: false
880
890
  Style/TrailingBodyOnMethodDefinition:
@@ -897,6 +907,8 @@ Style/TrivialAccessors:
897
907
  Enabled: false
898
908
  Style/UnlessElse:
899
909
  Enabled: false
910
+ Style/UnlessLogicalOperators:
911
+ Enabled: false
900
912
  Style/UnpackFirst:
901
913
  Enabled: false
902
914
  Style/VariableInterpolation:
data/config/upstream.yml CHANGED
@@ -130,7 +130,7 @@ AllCops:
130
130
  # What MRI version of the Ruby interpreter is the inspected code intended to
131
131
  # run on? (If there is more than one, set this to the lowest version.)
132
132
  # If a value is specified for TargetRubyVersion then it is used. Acceptable
133
- # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
133
+ # values are specificed as a float (i.e. 3.0); the teeny version of Ruby
134
134
  # should not be included. If the project specifies a Ruby version in the
135
135
  # .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
136
136
  # try to determine the desired version of Ruby by inspecting the
@@ -138,7 +138,7 @@ AllCops:
138
138
  # or gems.locked file. (Although the Ruby version is specified in the Gemfile
139
139
  # or gems.rb file, RuboCop reads the final value from the lock file.) If the
140
140
  # Ruby version is still unresolved, RuboCop will use the oldest officially
141
- # supported Ruby version (currently Ruby 2.4).
141
+ # supported Ruby version (currently Ruby 2.5).
142
142
  TargetRubyVersion: ~
143
143
  # Determines if a notification for extension libraries should be shown when
144
144
  # rubocop is run. Keys are the name of the extension, and values are an array
@@ -174,6 +174,20 @@ Bundler/GemComment:
174
174
  IgnoredGems: []
175
175
  OnlyFor: []
176
176
 
177
+ Bundler/GemVersion:
178
+ Description: 'Requires or forbids specifying gem versions.'
179
+ Enabled: false
180
+ VersionAdded: '1.14'
181
+ EnforcedStyle: 'required'
182
+ SupportedStyles:
183
+ - 'required'
184
+ - 'forbidden'
185
+ Include:
186
+ - '**/*.gemfile'
187
+ - '**/Gemfile'
188
+ - '**/gems.rb'
189
+ AllowedGems: []
190
+
177
191
  Bundler/InsecureProtocolSource:
178
192
  Description: >-
179
193
  The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
@@ -1101,11 +1115,24 @@ Layout/ParameterAlignment:
1101
1115
  # But it can be overridden by setting this parameter
1102
1116
  IndentationWidth: ~
1103
1117
 
1118
+ Layout/RedundantLineBreak:
1119
+ Description: >-
1120
+ Do not break up an expression into multiple lines when it fits
1121
+ on a single line.
1122
+ Enabled: false
1123
+ InspectBlocks: false
1124
+ VersionAdded: '1.13'
1125
+
1104
1126
  Layout/RescueEnsureAlignment:
1105
1127
  Description: 'Align rescues and ensures correctly.'
1106
1128
  Enabled: true
1107
1129
  VersionAdded: '0.49'
1108
1130
 
1131
+ Layout/SingleLineBlockChain:
1132
+ Description: 'Put method call on a separate line if chained to a single line block.'
1133
+ Enabled: false
1134
+ VersionAdded: '1.14'
1135
+
1109
1136
  Layout/SpaceAfterColon:
1110
1137
  Description: 'Use spaces after colons.'
1111
1138
  StyleGuide: '#spaces-operators'
@@ -1380,6 +1407,8 @@ Lint/AmbiguousBlockAssociation:
1380
1407
  StyleGuide: '#syntax'
1381
1408
  Enabled: true
1382
1409
  VersionAdded: '0.48'
1410
+ VersionChanged: '1.13'
1411
+ IgnoredMethods: []
1383
1412
 
1384
1413
  Lint/AmbiguousOperator:
1385
1414
  Description: >-
@@ -1583,7 +1612,7 @@ Lint/EmptyBlock:
1583
1612
  Description: 'This cop checks for blocks without a body.'
1584
1613
  Enabled: pending
1585
1614
  VersionAdded: '1.1'
1586
- VersionChanged: '1.3'
1615
+ VersionChanged: '1.15'
1587
1616
  AllowComments: true
1588
1617
  AllowEmptyLambdas: true
1589
1618
 
@@ -2055,13 +2084,18 @@ Lint/SuppressedException:
2055
2084
  StyleGuide: '#dont-hide-exceptions'
2056
2085
  Enabled: true
2057
2086
  AllowComments: true
2087
+ AllowNil: true
2058
2088
  VersionAdded: '0.9'
2059
- VersionChanged: '0.81'
2089
+ VersionChanged: '1.12'
2060
2090
 
2061
2091
  Lint/SymbolConversion:
2062
2092
  Description: 'Checks for unnecessary symbol conversions.'
2063
2093
  Enabled: pending
2064
2094
  VersionAdded: '1.9'
2095
+ EnforcedStyle: strict
2096
+ SupportedStyles:
2097
+ - strict
2098
+ - consistent
2065
2099
 
2066
2100
  Lint/Syntax:
2067
2101
  Description: 'Checks for syntax errors.'
@@ -2489,6 +2523,7 @@ Naming/MemoizedInstanceVariableName:
2489
2523
  - disallowed
2490
2524
  - required
2491
2525
  - optional
2526
+ Safe: false
2492
2527
 
2493
2528
  Naming/MethodName:
2494
2529
  Description: 'Use the configured style when naming methods.'
@@ -3174,6 +3209,7 @@ Style/Documentation:
3174
3209
  Description: 'Document classes and non-namespace modules.'
3175
3210
  Enabled: true
3176
3211
  VersionAdded: '0.9'
3212
+ AllowedConstants: []
3177
3213
  Exclude:
3178
3214
  - 'spec/**/*'
3179
3215
  - 'test/**/*'
@@ -3444,8 +3480,11 @@ Style/HashAsLastArrayItem:
3444
3480
 
3445
3481
  Style/HashConversion:
3446
3482
  Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
3483
+ StyleGuide: '#avoid-hash-constructor'
3447
3484
  Enabled: pending
3448
3485
  VersionAdded: '1.10'
3486
+ VersionChanged: '1.11'
3487
+ AllowSplatArgument: true
3449
3488
 
3450
3489
  Style/HashEachMethods:
3451
3490
  Description: 'Use Hash#each_key and Hash#each_value.'
@@ -3670,6 +3709,7 @@ Style/MethodCallWithArgsParentheses:
3670
3709
  AllowParenthesesInMultilineCall: false
3671
3710
  AllowParenthesesInChaining: false
3672
3711
  AllowParenthesesInCamelCaseMethod: false
3712
+ AllowParenthesesInStringInterpolation: false
3673
3713
  EnforcedStyle: require_parentheses
3674
3714
  SupportedStyles:
3675
3715
  - require_parentheses
@@ -3959,6 +3999,7 @@ Style/NilLambda:
3959
3999
  Description: 'Prefer `-> {}` to `-> { nil }`.'
3960
4000
  Enabled: pending
3961
4001
  VersionAdded: '1.3'
4002
+ VersionChanged: '1.15'
3962
4003
 
3963
4004
  Style/NonNilCheck:
3964
4005
  Description: 'Checks for redundant nil checks.'
@@ -4489,6 +4530,13 @@ Style/StderrPuts:
4489
4530
  Enabled: true
4490
4531
  VersionAdded: '0.51'
4491
4532
 
4533
+ Style/StringChars:
4534
+ Description: 'Checks for uses of `String#split` with empty string or regexp literal argument.'
4535
+ StyleGuide: '#string-chars'
4536
+ Enabled: pending
4537
+ Safe: false
4538
+ VersionAdded: '1.12'
4539
+
4492
4540
  Style/StringConcatenation:
4493
4541
  Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
4494
4542
  StyleGuide: '#string-interpolation'
@@ -4586,6 +4634,7 @@ Style/SymbolProc:
4586
4634
  Safe: false
4587
4635
  VersionAdded: '0.26'
4588
4636
  VersionChanged: '1.5'
4637
+ AllowMethodsWithArguments: false
4589
4638
  # A list of method names to be ignored by the check.
4590
4639
  # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
4591
4640
  IgnoredMethods:
@@ -4604,6 +4653,12 @@ Style/TernaryParentheses:
4604
4653
  - require_parentheses_when_complex
4605
4654
  AllowSafeAssignment: true
4606
4655
 
4656
+ Style/TopLevelMethodDefinition:
4657
+ Description: 'This cop looks for top-level method definitions.'
4658
+ StyleGuide: '#top-level-methods'
4659
+ Enabled: false
4660
+ VersionAdded: '1.15'
4661
+
4607
4662
  Style/TrailingBodyOnClass:
4608
4663
  Description: 'Class body goes below class statement.'
4609
4664
  Enabled: true
@@ -4690,7 +4745,7 @@ Style/TrivialAccessors:
4690
4745
  StyleGuide: '#attr_family'
4691
4746
  Enabled: true
4692
4747
  VersionAdded: '0.9'
4693
- VersionChanged: '0.77'
4748
+ VersionChanged: '1.15'
4694
4749
  # When set to `false` the cop will suggest the use of accessor methods
4695
4750
  # in situations like:
4696
4751
  #
@@ -4709,7 +4764,7 @@ Style/TrivialAccessors:
4709
4764
  # on_exception :restart
4710
4765
  #
4711
4766
  # Commonly used in DSLs
4712
- AllowDSLWriters: false
4767
+ AllowDSLWriters: true
4713
4768
  IgnoreClassMethods: false
4714
4769
  AllowedMethods:
4715
4770
  - to_ary
@@ -4738,6 +4793,16 @@ Style/UnlessElse:
4738
4793
  Enabled: true
4739
4794
  VersionAdded: '0.9'
4740
4795
 
4796
+ Style/UnlessLogicalOperators:
4797
+ Description: >-
4798
+ Checks for use of logical operators in an unless condition.
4799
+ Enabled: false
4800
+ VersionAdded: '1.11'
4801
+ EnforcedStyle: forbid_mixed_logical_operators
4802
+ SupportedStyles:
4803
+ - forbid_mixed_logical_operators
4804
+ - forbid_logical_operators
4805
+
4741
4806
  Style/UnpackFirst:
4742
4807
  Description: >-
4743
4808
  Checks for accessing the first element of `String#unpack`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "1.7.1"
4
- RUBOCOP_VERSION = "1.10.0"
3
+ VERSION = "2.0.4"
4
+ RUBOCOP_VERSION = "1.15.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.7.1
4
+ version: 2.0.4
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: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-05-27 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.10.0
19
+ version: 1.15.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.10.0
26
+ version: 1.15.0
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '2.4'
63
+ version: '2.5'
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="