rubocop-jekyll 0.8.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +229 -18
  3. data/README.md +3 -3
  4. data/lib/rubocop-jekyll.rb +1 -1
  5. metadata +25 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a674ce8ae15638c46e8eaebb886ffd994a820daed7de9209d7e0a6d36a816aa
4
- data.tar.gz: bc39896629769326d4bd206ba8af07939933eb7c203c26ac3c7aedd85e0067e8
3
+ metadata.gz: 4be4de0eb7599eee91a16c6e342549e5f28f140824f62d038a19c9f9250e673b
4
+ data.tar.gz: 19a2f98215eb43c87236722b1c19203f022ae4373b26b28d5a2b69f7e5aa1503
5
5
  SHA512:
6
- metadata.gz: e812263a17d4c0080e44d3ba38988f33ddbe5309ba30ad891f9cced12a58c4aad8009d2825b055f33ec011a3a59dfdbe1064fb844bef4da650301fa1a9b3c925
7
- data.tar.gz: 7b26a95593107454085c92bef0f287d45d5ee6ef7b4b375ae223cc1452b871e3282a4a8b73a97ad10b416c88e08f068db0611cc9fdc4fa4cc7ec7fab8dac05ad
6
+ metadata.gz: 612dda4b4a8c80a0cd4343bb3c433cbd6a652ec1f65f7a7bfd501985ed8d16ed65a980380f492ddf57b2fa81d03a8f75c592ffcd7df578a14fd03eccd490d94e
7
+ data.tar.gz: 4cf450679ed5189de8840216dee1a4c48495c9e7fec8075438008ee60896929fd4bc9de17502ae6c12f2c3e350bdc7368f4a4d73c525a52e093fd81a4f874f84
data/.rubocop.yml CHANGED
@@ -1,5 +1,8 @@
1
+ require:
2
+ - rubocop-performance
3
+
1
4
  AllCops:
2
- TargetRubyVersion: 2.3
5
+ TargetRubyVersion: 2.5
3
6
  Exclude:
4
7
  - bin/**/*
5
8
  - exe/**/*
@@ -8,27 +11,125 @@ AllCops:
8
11
  - vendor/**/*
9
12
  - tmp/**/*
10
13
 
14
+ Gemspec/DateAssignment:
15
+ Enabled: true
11
16
 
12
- Layout/AlignHash:
13
- EnforcedHashRocketStyle: table
14
- Layout/IndentationWidth:
17
+
18
+ Layout/BeginEndAlignment:
19
+ Enabled: true
20
+ Layout/EmptyComment:
21
+ Enabled: false
22
+ Layout/EmptyLinesAroundAttributeAccessor:
23
+ Enabled: true
24
+ Layout/EndAlignment:
15
25
  Severity: error
16
- Layout/IndentArray:
26
+ Layout/FirstArrayElementIndentation:
17
27
  EnforcedStyle: consistent
18
- Layout/IndentHash:
28
+ Layout/FirstHashElementIndentation:
19
29
  EnforcedStyle: consistent
30
+ Layout/HashAlignment:
31
+ EnforcedHashRocketStyle: table
32
+ Layout/IndentationWidth:
33
+ Severity: error
34
+ Layout/LineLength:
35
+ Max: 100
36
+ Severity: warning
20
37
  Layout/MultilineMethodCallIndentation:
21
38
  EnforcedStyle: indented
22
39
  Layout/MultilineOperationIndentation:
23
40
  EnforcedStyle: indented
24
- Layout/EmptyComment:
25
- Enabled: false
26
- Layout/EndAlignment:
27
- Severity: error
41
+ Layout/SpaceAroundMethodCallOperator:
42
+ Enabled: true
43
+ Layout/SpaceBeforeBrackets:
44
+ Enabled: true
45
+ Layout/SpaceInsideHashLiteralBraces:
46
+ Enabled: true
28
47
 
29
48
 
49
+ Lint/AmbiguousAssignment:
50
+ Enabled: true
51
+ Lint/BinaryOperatorWithIdenticalOperands:
52
+ Enabled: true
53
+ Lint/ConstantDefinitionInBlock:
54
+ Enabled: true
55
+ Lint/DeprecatedConstants:
56
+ Enabled: true
57
+ Lint/DeprecatedOpenSSLConstant:
58
+ Enabled: true
59
+ Lint/DuplicateBranch:
60
+ Enabled: true
61
+ Lint/DuplicateElsifCondition:
62
+ Enabled: true
63
+ Lint/DuplicateRegexpCharacterClassElement:
64
+ Enabled: true
65
+ Lint/DuplicateRequire:
66
+ Enabled: true
67
+ Lint/DuplicateRescueException:
68
+ Enabled: true
69
+ Lint/EmptyBlock:
70
+ Enabled: true
71
+ Lint/EmptyClass:
72
+ Enabled: true
73
+ Lint/EmptyConditionalBody:
74
+ Enabled: true
75
+ Lint/EmptyFile:
76
+ Enabled: true
77
+ Lint/FloatComparison:
78
+ Enabled: true
79
+ Lint/HashCompareByIdentity:
80
+ Enabled: true
81
+ Lint/IdentityComparison:
82
+ Enabled: true
83
+ Lint/LambdaWithoutLiteralBlock:
84
+ Enabled: true
85
+ Lint/MissingSuper:
86
+ Enabled: false
87
+ Lint/MixedRegexpCaptureTypes:
88
+ Enabled: false
89
+ Lint/NestedPercentLiteral:
90
+ Enabled: true
91
+ Lint/NoReturnInBeginEndBlocks:
92
+ Enabled: true
93
+ Lint/NumberedParameterAssignment:
94
+ Enabled: true
95
+ Lint/OrAssignmentToConstant:
96
+ Enabled: true
97
+ Lint/OutOfRangeRegexpRef:
98
+ Enabled: true
99
+ Lint/RaiseException:
100
+ Enabled: true
101
+ Lint/RedundantDirGlobSort:
102
+ Enabled: true
103
+ Lint/RedundantSafeNavigation:
104
+ Enabled: true
105
+ Lint/SelfAssignment:
106
+ Enabled: true
107
+ Lint/StructNewOverride:
108
+ Enabled: true
109
+ Lint/SymbolConversion:
110
+ Enabled: true
111
+ Lint/ToEnumArguments:
112
+ Enabled: false
113
+ Lint/TopLevelReturnWithArgument:
114
+ Enabled: true
115
+ Lint/TrailingCommaInAttributeDeclaration:
116
+ Enabled: true
117
+ Lint/TripleQuotes:
118
+ Enabled: true
119
+ Lint/UnexpectedBlockArity:
120
+ Enabled: true
121
+ Lint/UnmodifiedReduceAccumulator:
122
+ Enabled: true
30
123
  Lint/UnreachableCode:
31
124
  Severity: error
125
+ Lint/UnreachableLoop:
126
+ Enabled: true
127
+ Lint/UselessMethodDefinition:
128
+ Enabled: true
129
+ Lint/UselessTimes:
130
+ Enabled: true
131
+ Lint/Void:
132
+ Enabled: true
32
133
 
33
134
 
34
135
  Metrics/AbcSize:
@@ -38,9 +139,6 @@ Metrics/BlockLength:
38
139
  - !ruby/regexp /^spec/
39
140
  Metrics/ClassLength:
40
141
  Max: 240
41
- Metrics/LineLength:
42
- Max: 100
43
- Severity: warning
44
142
  Metrics/MethodLength:
45
143
  CountComments: false
46
144
  Max: 20
@@ -57,32 +155,119 @@ Naming/FileName:
57
155
  Enabled: false
58
156
  Naming/MemoizedInstanceVariableName:
59
157
  EnforcedStyleForLeadingUnderscores: optional
60
- Naming/UncommunicativeMethodParamName:
61
- AllowedNames:
62
- - _
158
+
159
+
160
+ Performance/AncestorsInclude:
161
+ Enabled: false
162
+ Performance/ArraySemiInfiniteRangeSlice:
163
+ Enabled: true
164
+ Performance/BigDecimalWithNumericArgument:
165
+ Enabled: true
166
+ Performance/BlockGivenWithExplicitBlock:
167
+ Enabled: true
168
+ Performance/ChainArrayAllocation:
169
+ Enabled: true
170
+ Performance/CollectionLiteralInLoop:
171
+ Enabled: true
172
+ Performance/ConstantRegexp:
173
+ Enabled: true
174
+ Performance/MethodObjectAsBlock:
175
+ Enabled: true
176
+ Performance/RedundantSortBlock:
177
+ Enabled: true
178
+ Performance/RedundantStringChars:
179
+ Enabled: true
180
+ Performance/ReverseFirst:
181
+ Enabled: true
182
+ Performance/SortReverse:
183
+ Enabled: false
184
+ Performance/Squeeze:
185
+ Enabled: true
186
+ Performance/StringInclude:
187
+ Enabled: true
188
+ Performance/Sum:
189
+ Enabled: true
63
190
 
64
191
 
65
192
  Style/AccessModifierDeclarations:
66
193
  Enabled: false
194
+ Style/AccessorGrouping:
195
+ Enabled: true
67
196
  Style/Alias:
68
197
  EnforcedStyle: prefer_alias_method
69
198
  Style/AndOr:
70
199
  Severity: error
71
- Style/FrozenStringLiteralComment:
72
- EnforcedStyle: always
200
+ Style/ArgumentsForwarding:
201
+ Enabled: false
202
+ Style/ArrayCoercion:
203
+ Enabled: true
204
+ Style/BisectedAttrAccessor:
205
+ Enabled: true
206
+ Style/CaseLikeIf:
207
+ Enabled: true
208
+ Style/StringChars:
209
+ Enabled: true
210
+ Style/ClassAndModuleChildren:
211
+ Enabled: true
212
+ Style/ClassEqualityComparison:
213
+ Enabled: true
214
+ Style/CollectionCompact:
215
+ Enabled: true
216
+ Style/CombinableLoops:
217
+ Enabled: true
218
+ Style/DocumentDynamicEvalDefinition:
219
+ Enabled: true
73
220
  Style/Documentation:
74
221
  Enabled: false
75
222
  Style/DoubleNegation:
76
223
  Enabled: false
224
+ Style/EndlessMethod:
225
+ Enabled: true
226
+ Style/ExplicitBlockArgument:
227
+ Enabled: false
228
+ Style/ExponentialNotation:
229
+ Enabled: true
230
+ Style/FormatStringToken:
231
+ Enabled: true
232
+ Style/FrozenStringLiteralComment:
233
+ EnforcedStyle: always
234
+ Style/GlobalStdStream:
235
+ Enabled: true
77
236
  Style/GuardClause:
78
237
  Enabled: false
238
+ Style/HashAsLastArrayItem:
239
+ Enabled: true
240
+ Style/HashConversion:
241
+ Enabled: true
242
+ Style/HashEachMethods:
243
+ Enabled: true
244
+ Style/HashExcept:
245
+ Enabled: true
246
+ Style/HashLikeCase:
247
+ Enabled: true
79
248
  Style/HashSyntax:
80
249
  EnforcedStyle: hash_rockets
81
250
  Severity: error
251
+ Style/HashTransformKeys:
252
+ Enabled: false
253
+ Style/HashTransformValues:
254
+ Enabled: true
255
+ Style/IfWithBooleanLiteralBranches:
256
+ Enabled: true
257
+ Style/KeywordParametersOrder:
258
+ Enabled: true
259
+ Style/MixinUsage:
260
+ Enabled: true
82
261
  Style/ModuleFunction:
83
262
  Enabled: false
84
263
  Style/MultilineTernaryOperator:
85
264
  Severity: error
265
+ Style/NegatedIfElseCondition:
266
+ Enabled: true
267
+ Style/NilLambda:
268
+ Enabled: true
269
+ Style/OptionalBooleanParameter:
270
+ Enabled: true
86
271
  Style/PercentLiteralDelimiters:
87
272
  PreferredDelimiters:
88
273
  "%q": "{}"
@@ -92,16 +277,42 @@ Style/PercentLiteralDelimiters:
92
277
  "%w": "()"
93
278
  "%W": "()"
94
279
  "%x": "()"
280
+ Style/RedundantArgument:
281
+ Enabled: true
282
+ Style/RedundantAssignment:
283
+ Enabled: true
284
+ Style/RedundantFetchBlock:
285
+ Enabled: false
286
+ Style/RedundantFileExtensionInRequire:
287
+ Enabled: true
288
+ Style/RedundantRegexpCharacterClass:
289
+ Enabled: true
290
+ Style/RedundantRegexpEscape:
291
+ Enabled: true
292
+ Style/RedundantSelfAssignment:
293
+ Enabled: true
95
294
  Style/RegexpLiteral:
96
295
  EnforcedStyle: percent_r
97
296
  Style/RescueModifier:
98
297
  Enabled: false
298
+ Style/SafeNavigation:
299
+ Enabled: true
99
300
  Style/SignalException:
100
301
  EnforcedStyle: only_raise
302
+ Style/SingleArgumentDig:
303
+ Enabled: true
304
+ Style/SlicingWithRange:
305
+ Enabled: false
306
+ Style/SoleNestedConditional:
307
+ Enabled: true
308
+ Style/StringConcatenation:
309
+ Enabled: true
101
310
  Style/StringLiterals:
102
311
  EnforcedStyle: double_quotes
103
312
  Style/StringLiteralsInInterpolation:
104
313
  EnforcedStyle: double_quotes
314
+ Style/SwapValues:
315
+ Enabled: true
105
316
  Style/SymbolArray:
106
317
  EnforcedStyle: brackets
107
318
  Style/TrailingCommaInArrayLiteral:
data/README.md CHANGED
@@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins.
4
4
 
5
5
 
6
6
  [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems]
7
- [![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.65.x-green.svg)][rubocop-releases]
7
+ [![RuboCop Support](https://img.shields.io/badge/RuboCop%20Support-1.18.x-green.svg)][rubocop-releases]
8
8
 
9
9
  [rubygems]: https://rubygems.org/gems/rubocop-jekyll
10
10
  [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases
@@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec`
23
23
  ```ruby
24
24
  # Gemfile
25
25
 
26
- gem "rubocop-jekyll", "~> 0.8.0"
26
+ gem "rubocop-jekyll", "~> 0.12.0"
27
27
  ```
28
28
  ```ruby
29
29
  # <plugin>.gemspec
30
30
 
31
- spec.add_development_dependency "rubocop-jekyll", "~> 0.8.0"
31
+ spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0"
32
32
  ```
33
33
  and run `bundle install`
34
34
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  path_to_cops = File.join(File.expand_path("rubocop", __dir__), "cop", "**", "*.rb")
4
- Dir[path_to_cops].each { |cop| require cop }
4
+ Dir[path_to_cops].sort.each { |cop| require cop }
metadata CHANGED
@@ -1,35 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashwin Maroli
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-20 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.57.2
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 0.66.0
19
+ version: 1.18.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.18.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-performance
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
28
32
  - !ruby/object:Gem::Version
29
- version: 0.57.2
30
- - - "<"
33
+ version: '1.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
31
39
  - !ruby/object:Gem::Version
32
- version: 0.66.0
40
+ version: '1.2'
33
41
  description: A RuboCop extension to enforce common code style in Jekyll and Jekyll
34
42
  plugins
35
43
  email:
@@ -44,11 +52,11 @@ files:
44
52
  - lib/rubocop-jekyll.rb
45
53
  - lib/rubocop/cop/jekyll/no_p_allowed.rb
46
54
  - lib/rubocop/cop/jekyll/no_puts_allowed.rb
47
- homepage: https://github.com/ashmaroli/rubocop-jekyll
55
+ homepage: https://github.com/jekyll/rubocop-jekyll
48
56
  licenses:
49
57
  - MIT
50
58
  metadata: {}
51
- post_install_message:
59
+ post_install_message:
52
60
  rdoc_options: []
53
61
  require_paths:
54
62
  - lib
@@ -56,16 +64,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
64
  requirements:
57
65
  - - ">="
58
66
  - !ruby/object:Gem::Version
59
- version: 2.3.0
67
+ version: 2.5.0
60
68
  required_rubygems_version: !ruby/object:Gem::Requirement
61
69
  requirements:
62
70
  - - ">="
63
71
  - !ruby/object:Gem::Version
64
72
  version: '0'
65
73
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.7.5
68
- signing_key:
74
+ rubygems_version: 3.1.6
75
+ signing_key:
69
76
  specification_version: 4
70
77
  summary: Code style check for Jekyll and Jekyll plugins
71
78
  test_files: []