chefstyle 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/chefstyle.yml +21 -6
- data/config/disable_all.yml +2 -0
- data/config/disabled.yml +0 -4
- data/config/enabled.yml +15 -3
- data/config/upstream.yml +27 -1
- data/lib/chefstyle/version.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59f6eeec9124e1a5b410c337a2f397960cbecb40
|
4
|
+
data.tar.gz: 7700043724c67630b39c5610ccac56e0bd6d7953
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2770939d4ebc8e963867abcd588c3796b2096288cccf1b81d4136bf8bcffd8613537392415632b8d2f552ce7abf1f77aaa02a9344fffe72f6156d903229ebf7
|
7
|
+
data.tar.gz: 8d85d02ec98ab91bdcadd783c3a603542a8fc2c17f909f762865eb5430b7f7775362c1b5ea211dd38751c323397e6dfa04223257f1fbf37b0c4014588a3c503c
|
data/config/chefstyle.yml
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
#
|
3
2
|
# Lint
|
4
3
|
#
|
@@ -81,18 +80,32 @@ Lint/RescueException:
|
|
81
80
|
# Performance
|
82
81
|
#
|
83
82
|
|
83
|
+
Performance/CaseCmp:
|
84
|
+
Enabled: true
|
84
85
|
Performance/CaseWhenSplat:
|
85
86
|
Enabled: true
|
87
|
+
Performance/Detect:
|
88
|
+
Enabled: true
|
86
89
|
Performance/FixedSize:
|
87
90
|
Enabled: true
|
88
91
|
Performance/FlatMap:
|
89
92
|
Enabled: true
|
93
|
+
Performance/RangeInclude:
|
94
|
+
Enabled: true
|
95
|
+
Performance/RedundantBlockCall:
|
96
|
+
Enabled: true
|
97
|
+
Performance/RedundantMatch:
|
98
|
+
Enabled: true
|
99
|
+
Performance/RedundantMerge:
|
100
|
+
Enabled: true
|
90
101
|
Performance/ReverseEach:
|
91
102
|
Enabled: true
|
92
103
|
Performance/Sample:
|
93
104
|
Enabled: true
|
94
105
|
Performance/Size:
|
95
106
|
Enabled: true
|
107
|
+
Performance/StringReplacement:
|
108
|
+
Enabled: true
|
96
109
|
|
97
110
|
#
|
98
111
|
# Rails
|
@@ -102,8 +115,6 @@ Rails/ActionFilter:
|
|
102
115
|
Enabled: true
|
103
116
|
Rails/Date:
|
104
117
|
Enabled: true
|
105
|
-
Rails/DefaultScope:
|
106
|
-
Enabled: true
|
107
118
|
Rails/Delegate:
|
108
119
|
Enabled: true
|
109
120
|
Rails/FindBy:
|
@@ -157,6 +168,8 @@ Metrics/PerceivedComplexity:
|
|
157
168
|
|
158
169
|
Style/AlignHash:
|
159
170
|
Enabled: true
|
171
|
+
Style/AndOr:
|
172
|
+
Enabled: true
|
160
173
|
Style/ArrayJoin:
|
161
174
|
Enabled: true
|
162
175
|
Style/AsciiIdentifiers:
|
@@ -265,7 +278,7 @@ Style/SpaceBeforeBlockBraces:
|
|
265
278
|
Enabled: true
|
266
279
|
Style/SpaceBeforeFirstArg:
|
267
280
|
Enabled: true
|
268
|
-
Style/
|
281
|
+
Style/SpaceAroundKeyword:
|
269
282
|
Enabled: true
|
270
283
|
Style/SpaceInsideBlockBraces:
|
271
284
|
Enabled: true
|
@@ -285,8 +298,10 @@ Style/Tab:
|
|
285
298
|
Enabled: true
|
286
299
|
Style/TrailingBlankLines:
|
287
300
|
Enabled: true
|
301
|
+
Style/TrailingCommaInArguments:
|
302
|
+
Enabled: true
|
288
303
|
# rubocop's default gets this completely backwards
|
289
|
-
Style/
|
304
|
+
Style/TrailingCommaInLiteral:
|
290
305
|
Enabled: true
|
291
306
|
EnforcedStyleForMultiline: comma
|
292
307
|
Style/TrailingUnderscoreVariable:
|
@@ -314,7 +329,7 @@ Style/Documentation:
|
|
314
329
|
Enabled: false
|
315
330
|
|
316
331
|
# this makes whitespace formatting of DSL code impossible
|
317
|
-
Style/
|
332
|
+
Style/SpaceBeforeFirstArg:
|
318
333
|
Enabled: false
|
319
334
|
|
320
335
|
# whitespace in expressions is useful to enhance readability
|
data/config/disable_all.yml
CHANGED
data/config/disabled.yml
CHANGED
@@ -123,7 +123,3 @@ Style/SymbolArray:
|
|
123
123
|
Description: 'Use %i or %I for arrays of symbols.'
|
124
124
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
|
125
125
|
Enabled: false
|
126
|
-
|
127
|
-
Lint/LiteralInInterpolation:
|
128
|
-
Description: 'Avoid interpolating literals in strings'
|
129
|
-
AutoCorrect: false
|
data/config/enabled.yml
CHANGED
@@ -159,9 +159,6 @@ Style/ConditionalAssignment:
|
|
159
159
|
assignment to a variable and variable comparison instead
|
160
160
|
of assigning that variable inside of each branch.
|
161
161
|
Enabled: true
|
162
|
-
SingleLineConditionsOnly: true
|
163
|
-
# Whether the cop should register offenses for conditionals whose branches
|
164
|
-
# contain more than one statement a piece
|
165
162
|
|
166
163
|
Style/ConstantName:
|
167
164
|
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
@@ -324,6 +321,11 @@ Style/IfUnlessModifier:
|
|
324
321
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
325
322
|
Enabled: true
|
326
323
|
|
324
|
+
Style/IfUnlessModifierOfIfUnless:
|
325
|
+
Description: >-
|
326
|
+
Avoid modifier if/unless usage on conditionals.
|
327
|
+
Enabled: true
|
328
|
+
|
327
329
|
Style/IfWithSemicolon:
|
328
330
|
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
329
331
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
@@ -1173,6 +1175,11 @@ Performance/Count:
|
|
1173
1175
|
Use `count` instead of `select...size`, `reject...size`,
|
1174
1176
|
`select...count`, `reject...count`, `select...length`,
|
1175
1177
|
and `reject...length`.
|
1178
|
+
# This cop has known compatibility issues with `ActiveRecord` and other
|
1179
|
+
# frameworks. ActiveRecord's `count` ignores the block that is passed to it.
|
1180
|
+
# For more information, see the documentation in the cop itself.
|
1181
|
+
# If you understand the known risk, you can disable `SafeMode`.
|
1182
|
+
SafeMode: true
|
1176
1183
|
Enabled: true
|
1177
1184
|
|
1178
1185
|
Performance/Detect:
|
@@ -1180,6 +1187,11 @@ Performance/Detect:
|
|
1180
1187
|
Use `detect` instead of `select.first`, `find_all.first`,
|
1181
1188
|
`select.last`, and `find_all.last`.
|
1182
1189
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
1190
|
+
# This cop has known compatibility issues with `ActiveRecord` and other
|
1191
|
+
# frameworks. `ActiveRecord` does not implement a `detect` method and `find`
|
1192
|
+
# has its own meaning. Correcting `ActiveRecord` methods with this cop
|
1193
|
+
# should be considered unsafe.
|
1194
|
+
SafeMode: true
|
1183
1195
|
Enabled: true
|
1184
1196
|
|
1185
1197
|
Performance/DoubleStartEndWith:
|
data/config/upstream.yml
CHANGED
@@ -344,6 +344,19 @@ Style/CommentAnnotation:
|
|
344
344
|
- HACK
|
345
345
|
- REVIEW
|
346
346
|
|
347
|
+
Style/ConditionalAssignment:
|
348
|
+
EnforcedStyle: assign_to_condition
|
349
|
+
SupportedStyles:
|
350
|
+
- assign_to_condition
|
351
|
+
- assign_inside_condition
|
352
|
+
# When configured to `assign_to_condition`, `SingleLineConditionsOnly`
|
353
|
+
# will only register an offense when all branches of a condition are
|
354
|
+
# a single line.
|
355
|
+
# When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
|
356
|
+
# will only register an offense for assignment to a condition that has
|
357
|
+
# at least one multiline branch.
|
358
|
+
SingleLineConditionsOnly: true
|
359
|
+
|
347
360
|
# Checks that you have put a copyright in a comment before any code.
|
348
361
|
#
|
349
362
|
# You can override the default Notice in your .rubocop.yml file.
|
@@ -892,7 +905,7 @@ Style/TrivialAccessors:
|
|
892
905
|
#
|
893
906
|
# This way you can uncover "hidden" attributes in your code.
|
894
907
|
ExactNameMatch: true
|
895
|
-
AllowPredicates:
|
908
|
+
AllowPredicates: true
|
896
909
|
# Allows trivial writers that don't end in an equal sign. e.g.
|
897
910
|
#
|
898
911
|
# def on_exception(action)
|
@@ -989,6 +1002,19 @@ Metrics/PerceivedComplexity:
|
|
989
1002
|
Lint/AssignmentInCondition:
|
990
1003
|
AllowSafeAssignment: true
|
991
1004
|
|
1005
|
+
# checks whether the end keywords are aligned properly for `do` `end` blocks.
|
1006
|
+
Lint/BlockAlignment:
|
1007
|
+
# The value `start_of_block` means that the `end` should be aligned with line
|
1008
|
+
# where the `do` keyword appears.
|
1009
|
+
# The value `start_of_line` means it should be aligned with the whole
|
1010
|
+
# expression's starting line.
|
1011
|
+
# The value `either` means both are allowed.
|
1012
|
+
AlignWith: either
|
1013
|
+
SupportedStyles:
|
1014
|
+
- either
|
1015
|
+
- start_of_block
|
1016
|
+
- start_of_line
|
1017
|
+
|
992
1018
|
# Align ends correctly.
|
993
1019
|
Lint/EndAlignment:
|
994
1020
|
# The value `keyword` means that `end` should be aligned with the matching
|
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: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-01 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.39.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.39.0
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- thom@chef.io
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.5.
|
114
|
+
rubygems_version: 2.4.5.1
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Rubocop configuration for Chef's ruby projects
|