chefstyle 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/chefstyle +1 -2
- data/chefstyle.gemspec +1 -1
- data/config/chefstyle.yml +5 -5
- data/config/disable_all.yml +12 -0
- data/config/upstream.yml +57 -6
- data/lib/chefstyle.rb +1 -0
- data/lib/chefstyle/version.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16247205f8d2e388a3ac7c5a4336c245cc549c15b9398b5386ca99cf05baccfd
|
4
|
+
data.tar.gz: fd8755fc0d427637a9b1945a335eb3b3469d51d40b998aaf8e97ef872b7207bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e4b623134b357308f474ffcfe4f4ec4aa5b93b05f3a86218f8b824f6c6be31d78470cb89a87735e02744d147ac6d727b21e71183a43a8a24739940e26fa6f1
|
7
|
+
data.tar.gz: 9118fa2012461bee7207ddd039fb6da69d6a0d85e673ce052a3c76543c38f167e3e8fa0dda142bf8193004be525a87614d17d26dd55d48327eb3555745acd8db
|
data/bin/chefstyle
CHANGED
data/chefstyle.gemspec
CHANGED
data/config/chefstyle.yml
CHANGED
@@ -482,11 +482,15 @@ Style/WhileUntilModifier:
|
|
482
482
|
Style/WordArray:
|
483
483
|
Enabled: true
|
484
484
|
|
485
|
+
# we are ruby > 2.0 only so we can remove encoding comments for utf-8
|
486
|
+
Style/Encoding:
|
487
|
+
Enabled: true
|
488
|
+
|
485
489
|
#
|
486
490
|
# Disabled Style
|
487
491
|
#
|
488
492
|
|
489
|
-
#
|
493
|
+
# reduces memory usage, but isn't a simple autocorrect so we need to do this one project at a time
|
490
494
|
Style/FrozenStringLiteralComment:
|
491
495
|
Enabled: false
|
492
496
|
|
@@ -529,10 +533,6 @@ Style/FormatString:
|
|
529
533
|
Style/IfUnlessModifier:
|
530
534
|
Enabled: false
|
531
535
|
|
532
|
-
# we are ruby > 2.0 only so can disable the Encoding cop
|
533
|
-
Style/Encoding:
|
534
|
-
Enabled: false
|
535
|
-
|
536
536
|
# Dan is -1 on this one: https://github.com/chef/chef/pull/4526#issuecomment-179950045
|
537
537
|
Layout/IndentFirstHashElement:
|
538
538
|
Enabled: false
|
data/config/disable_all.yml
CHANGED
@@ -223,6 +223,8 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
223
223
|
Enabled: false
|
224
224
|
Lint/DuplicateCaseCondition:
|
225
225
|
Enabled: false
|
226
|
+
Lint/DuplicateElsifCondition:
|
227
|
+
Enabled: false
|
226
228
|
Lint/DuplicateHashKey:
|
227
229
|
Enabled: false
|
228
230
|
Lint/DuplicateMethods:
|
@@ -427,6 +429,8 @@ Style/Alias:
|
|
427
429
|
Enabled: false
|
428
430
|
Style/AndOr:
|
429
431
|
Enabled: false
|
432
|
+
Style/ArrayCoercion:
|
433
|
+
Enabled: false
|
430
434
|
Style/ArrayJoin:
|
431
435
|
Enabled: false
|
432
436
|
Style/AsciiComments:
|
@@ -447,6 +451,8 @@ Style/BlockDelimiters:
|
|
447
451
|
Enabled: false
|
448
452
|
Style/CaseEquality:
|
449
453
|
Enabled: false
|
454
|
+
Style/CaseLikeIf:
|
455
|
+
Enabled: false
|
450
456
|
Style/CharacterLiteral:
|
451
457
|
Enabled: false
|
452
458
|
Style/ClassAndModuleChildren:
|
@@ -533,8 +539,12 @@ Style/GlobalVars:
|
|
533
539
|
Enabled: false
|
534
540
|
Style/GuardClause:
|
535
541
|
Enabled: false
|
542
|
+
Style/HashAsLastArrayItem:
|
543
|
+
Enabled: false
|
536
544
|
Style/HashEachMethods:
|
537
545
|
Enabled: false
|
546
|
+
Style/HashLikeCase:
|
547
|
+
Enabled: false
|
538
548
|
Style/HashSyntax:
|
539
549
|
Enabled: false
|
540
550
|
Style/HashTransformKeys:
|
@@ -575,6 +585,8 @@ Style/RedundantAssignment:
|
|
575
585
|
Enabled: false
|
576
586
|
Style/RedundantFetchBlock:
|
577
587
|
Enabled: false
|
588
|
+
Style/RedundantFileExtensionInRequire:
|
589
|
+
Enabled: false
|
578
590
|
Style/MethodCalledOnDoEndBlock:
|
579
591
|
Enabled: false
|
580
592
|
Style/MethodDefParentheses:
|
data/config/upstream.yml
CHANGED
@@ -1397,12 +1397,18 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
1397
1397
|
Enabled: true
|
1398
1398
|
Safe: false
|
1399
1399
|
VersionAdded: '0.62'
|
1400
|
+
VersionChanged: '0.88'
|
1400
1401
|
|
1401
1402
|
Lint/DuplicateCaseCondition:
|
1402
1403
|
Description: 'Do not repeat values in case conditionals.'
|
1403
1404
|
Enabled: true
|
1404
1405
|
VersionAdded: '0.45'
|
1405
1406
|
|
1407
|
+
Lint/DuplicateElsifCondition:
|
1408
|
+
Description: 'Do not repeat conditions used in if `elsif`.'
|
1409
|
+
Enabled: 'pending'
|
1410
|
+
VersionAdded: '0.88'
|
1411
|
+
|
1406
1412
|
Lint/DuplicateHashKey:
|
1407
1413
|
Description: 'Check for duplicate keys in hash literals.'
|
1408
1414
|
Enabled: true
|
@@ -2179,17 +2185,18 @@ Naming/MethodParameterName:
|
|
2179
2185
|
AllowNamesEndingInNumbers: true
|
2180
2186
|
# Allowed names that will not register an offense
|
2181
2187
|
AllowedNames:
|
2182
|
-
-
|
2183
|
-
- id
|
2184
|
-
- to
|
2188
|
+
- at
|
2185
2189
|
- by
|
2186
|
-
-
|
2190
|
+
- db
|
2191
|
+
- id
|
2187
2192
|
- in
|
2188
|
-
-
|
2193
|
+
- io
|
2189
2194
|
- ip
|
2190
|
-
-
|
2195
|
+
- of
|
2196
|
+
- 'on'
|
2191
2197
|
- os
|
2192
2198
|
- pp
|
2199
|
+
- to
|
2193
2200
|
# Forbidden names that will register an offense
|
2194
2201
|
ForbiddenNames: []
|
2195
2202
|
|
@@ -2340,6 +2347,14 @@ Style/AndOr:
|
|
2340
2347
|
- always
|
2341
2348
|
- conditionals
|
2342
2349
|
|
2350
|
+
Style/ArrayCoercion:
|
2351
|
+
Description: >-
|
2352
|
+
Use Array() instead of explicit Array check or [*var], when dealing
|
2353
|
+
with a variable you want to treat as an Array, but you're not certain it's an array.
|
2354
|
+
StyleGuide: '#array-coercion'
|
2355
|
+
Enabled: 'pending'
|
2356
|
+
VersionAdded: '0.88'
|
2357
|
+
|
2343
2358
|
Style/ArrayJoin:
|
2344
2359
|
Description: 'Use Array#join instead of Array#*.'
|
2345
2360
|
StyleGuide: '#array-join'
|
@@ -2522,6 +2537,12 @@ Style/CaseEquality:
|
|
2522
2537
|
# String === "string"
|
2523
2538
|
AllowOnConstant: false
|
2524
2539
|
|
2540
|
+
Style/CaseLikeIf:
|
2541
|
+
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2542
|
+
StyleGuide: '#case-vs-if-else'
|
2543
|
+
Enabled: 'pending'
|
2544
|
+
VersionAdded: '0.88'
|
2545
|
+
|
2525
2546
|
Style/CharacterLiteral:
|
2526
2547
|
Description: 'Checks for uses of character literals.'
|
2527
2548
|
StyleGuide: '#no-character-literals'
|
@@ -2961,6 +2982,18 @@ Style/GuardClause:
|
|
2961
2982
|
# needs to have to trigger this cop
|
2962
2983
|
MinBodyLength: 1
|
2963
2984
|
|
2985
|
+
Style/HashAsLastArrayItem:
|
2986
|
+
Description: >-
|
2987
|
+
Checks for presence or absence of braces around hash literal as a last
|
2988
|
+
array item depending on configuration.
|
2989
|
+
StyleGuide: '#hash-literal-as-last-array-item'
|
2990
|
+
Enabled: 'pending'
|
2991
|
+
VersionAdded: '0.88'
|
2992
|
+
EnforcedStyle: braces
|
2993
|
+
SupportedStyles:
|
2994
|
+
- braces
|
2995
|
+
- no_braces
|
2996
|
+
|
2964
2997
|
Style/HashEachMethods:
|
2965
2998
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
2966
2999
|
StyleGuide: '#hash-each'
|
@@ -2968,6 +3001,16 @@ Style/HashEachMethods:
|
|
2968
3001
|
VersionAdded: '0.80'
|
2969
3002
|
Safe: false
|
2970
3003
|
|
3004
|
+
Style/HashLikeCase:
|
3005
|
+
Description: >-
|
3006
|
+
Checks for places where `case-when` represents a simple 1:1
|
3007
|
+
mapping and can be replaced with a hash lookup.
|
3008
|
+
Enabled: 'pending'
|
3009
|
+
VersionAdded: '0.88'
|
3010
|
+
# `MinBranchesCount` defines the number of branches `case` needs to have
|
3011
|
+
# to trigger this cop
|
3012
|
+
MinBranchesCount: 3
|
3013
|
+
|
2971
3014
|
Style/HashSyntax:
|
2972
3015
|
Description: >-
|
2973
3016
|
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
@@ -3665,6 +3708,14 @@ Style/RedundantFetchBlock:
|
|
3665
3708
|
SafeForConstants: false
|
3666
3709
|
VersionAdded: '0.86'
|
3667
3710
|
|
3711
|
+
Style/RedundantFileExtensionInRequire:
|
3712
|
+
Description: >-
|
3713
|
+
Checks for the presence of superfluous `.rb` extension in
|
3714
|
+
the filename provided to `require` and `require_relative`.
|
3715
|
+
StyleGuide: '#no-explicit-rb-to-require'
|
3716
|
+
Enabled: 'pending'
|
3717
|
+
VersionAdded: '0.88'
|
3718
|
+
|
3668
3719
|
Style/RedundantFreeze:
|
3669
3720
|
Description: "Checks usages of Object#freeze on immutable objects."
|
3670
3721
|
Enabled: true
|
data/lib/chefstyle.rb
CHANGED
data/lib/chefstyle/version.rb
CHANGED
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.
|
4
|
+
version: 1.2.0
|
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-07-
|
11
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.88.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.88.0
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- oss@chef.io
|