kuyio-rubocop 0.1.5 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -1
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/kuyio-rubocop.gemspec +12 -8
- data/lib/kuyio/rubocop/version.rb +1 -1
- data/lib/kuyio/rubocop.rb +2 -0
- data/rubocop-all.yml +14 -0
- data/rubocop-bundler.yml +4 -0
- data/rubocop-default.yml +19 -0
- data/rubocop-gemspec.yml +12 -0
- data/rubocop-layout.yml +306 -0
- data/rubocop-lint.yml +397 -0
- data/rubocop-metrics.yml +44 -0
- data/rubocop-naming.yml +65 -0
- data/rubocop-performance.yml +146 -0
- data/rubocop-rails.yml +195 -0
- data/rubocop-rspec.yml +160 -0
- data/rubocop-security.yml +18 -0
- data/rubocop-style.yml +464 -0
- metadata +41 -15
- data/default.yml +0 -175
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ace690ff424a5467d0298f39d6c307010195f39cb3852a07a37e5e093c2d92b
|
4
|
+
data.tar.gz: 032aa079a8eaa38e741dd997105b626fb585ade62a4e49cb6ee3d5c2905bf901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df14a44f345eab6be08f13a327ddc069cdfe1c38fe706d67b461d4ba33d6ea20f4ac0afa7657fd5166b6b39e19e3845c93820451528252eb31808e34866752cd
|
7
|
+
data.tar.gz: b40761c8641bd995c8b2a4e223dc937c99ab39e5328f81730270ad34a7ba333aa26eacb9be09cf061016593bc92594f54878578d9810a941a82f1098683d3761
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/kuyio-rubocop.gemspec
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require "kuyio/rubocop/version"
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
8
|
+
spec.required_ruby_version = '>= 2.6'
|
7
9
|
spec.name = "kuyio-rubocop"
|
8
10
|
spec.version = Kuyio::Rubocop::VERSION
|
9
11
|
spec.authors = ["KUY.io Inc."]
|
@@ -18,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
18
20
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
19
21
|
else
|
20
22
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
21
|
-
|
23
|
+
"public gem pushes."
|
22
24
|
end
|
23
25
|
|
24
|
-
spec.files
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
25
27
|
f.match(%r{^(test|spec|features)/})
|
26
28
|
end
|
27
29
|
spec.bindir = "exe"
|
@@ -32,11 +34,13 @@ Gem::Specification.new do |spec|
|
|
32
34
|
# importing this gem can run bundle exec rubocop out
|
33
35
|
# of the box without having to maintain rubocop gem
|
34
36
|
# dependencies themselves.
|
35
|
-
spec.add_dependency
|
36
|
-
spec.add_dependency
|
37
|
-
spec.add_dependency
|
38
|
-
spec.add_dependency
|
37
|
+
spec.add_dependency 'rubocop', '~> 1.50.2'
|
38
|
+
spec.add_dependency 'rubocop-performance', '~> 1.15.0'
|
39
|
+
spec.add_dependency 'rubocop-rails', '~> 2.17.0'
|
40
|
+
spec.add_dependency 'rubocop-rspec', '~> 2.22.0'
|
41
|
+
|
39
42
|
spec.add_dependency "brakeman", "~> 5.4"
|
40
43
|
spec.add_development_dependency "bundler", "~> 2.3"
|
41
44
|
spec.add_development_dependency "rake", "~> 13.0"
|
45
|
+
spec.add_development_dependency 'rubocop-rake', '~> 0.6'
|
42
46
|
end
|
data/lib/kuyio/rubocop.rb
CHANGED
data/rubocop-all.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.6
|
4
|
+
# Cop names are not displayed in offense messages by default. Change behavior
|
5
|
+
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
6
|
+
# option.
|
7
|
+
DisplayCopNames: true
|
8
|
+
# Style guide URLs are not displayed in offense messages by default. Change
|
9
|
+
# behavior by overriding DisplayStyleGuide, or by giving the
|
10
|
+
# -S/--display-style-guide option.
|
11
|
+
DisplayStyleGuide: true
|
12
|
+
# Opt out of suggesting extensions
|
13
|
+
# see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions
|
14
|
+
SuggestExtensions: false
|
data/rubocop-bundler.yml
ADDED
data/rubocop-default.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
require:
|
3
|
+
- rubocop-rspec
|
4
|
+
- rubocop-performance
|
5
|
+
- rubocop-rails
|
6
|
+
|
7
|
+
inherit_from:
|
8
|
+
- rubocop-all.yml
|
9
|
+
- rubocop-bundler.yml
|
10
|
+
- rubocop-gemspec.yml
|
11
|
+
- rubocop-layout.yml
|
12
|
+
- rubocop-lint.yml
|
13
|
+
- rubocop-metrics.yml
|
14
|
+
- rubocop-naming.yml
|
15
|
+
- rubocop-performance.yml
|
16
|
+
- rubocop-rails.yml
|
17
|
+
- rubocop-rspec.yml
|
18
|
+
- rubocop-security.yml
|
19
|
+
- rubocop-style.yml
|
data/rubocop-gemspec.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
---
|
2
|
+
# Dependencies in the gemspec should be alphabetically sorted
|
3
|
+
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
4
|
+
Gemspec/OrderedDependencies:
|
5
|
+
Include:
|
6
|
+
- '**/*.gemspec'
|
7
|
+
|
8
|
+
# Enforce that development dependencies for a gem are specified in Gemfile,
|
9
|
+
# rather than in the gemspec using add_development_dependency
|
10
|
+
# Reason: Each project may decide to use a different strategy.
|
11
|
+
Gemspec/DevelopmentDependencies:
|
12
|
+
Enabled: false
|
data/rubocop-layout.yml
ADDED
@@ -0,0 +1,306 @@
|
|
1
|
+
---
|
2
|
+
# Check indentation of private/protected visibility modifiers.
|
3
|
+
Layout/AccessModifierIndentation:
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
# Check if the arguments on a multi-line method definition are aligned.
|
7
|
+
Layout/ArgumentAlignment:
|
8
|
+
EnforcedStyle: with_fixed_indentation
|
9
|
+
|
10
|
+
# Align the elements of an array literal if they span more than one line.
|
11
|
+
Layout/ArrayAlignment:
|
12
|
+
EnforcedStyle: with_fixed_indentation
|
13
|
+
|
14
|
+
# Checks the indentation of the first line of the right-hand-side of a
|
15
|
+
# multi-line assignment.
|
16
|
+
Layout/AssignmentIndentation:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Layout/BeginEndAlignment: # (new in 0.91)
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
# Align block ends correctly.
|
23
|
+
Layout/BlockAlignment:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
# Put end statement of multiline block on its own line.
|
27
|
+
Layout/BlockEndNewline:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
# Indentation of when in a case/when/[else/]end.
|
31
|
+
Layout/CaseIndentation:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
# Indentation of comments.
|
35
|
+
Layout/CommentIndentation:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
# Checks for condition placed in a confusing position relative to the keyword.
|
39
|
+
Layout/ConditionPosition:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
# Align ends corresponding to defs correctly.
|
43
|
+
Layout/DefEndAlignment:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
# Multi-line method chaining should be done with leading dots.
|
47
|
+
Layout/DotPosition:
|
48
|
+
Enabled: true
|
49
|
+
EnforcedStyle: leading
|
50
|
+
|
51
|
+
# Align elses and elsifs correctly.
|
52
|
+
Layout/ElseAlignment:
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
# Checks for a newline after the final magic comment.
|
56
|
+
Layout/EmptyLineAfterMagicComment:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
# Use empty lines between defs.
|
60
|
+
Layout/EmptyLineBetweenDefs:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
# Don't use several empty lines in a row.
|
64
|
+
Layout/EmptyLines:
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
# Keep blank lines around access modifiers.
|
68
|
+
Layout/EmptyLinesAroundAccessModifier:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
# Checks for a newline after an attribute accessor or a group of them
|
72
|
+
# https://docs.rubocop.org/rubocop/0.89/cops_layout.html#layoutemptylinesaroundattributeaccessor
|
73
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
# Keeps track of empty lines around block bodies.
|
77
|
+
Layout/EmptyLinesAroundBlockBody:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
# Keeps track of empty lines around class bodies.
|
81
|
+
Layout/EmptyLinesAroundClassBody:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
# Keeps track of empty lines around exception handling keywords.
|
85
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
86
|
+
Enabled: false
|
87
|
+
|
88
|
+
# Keeps track of empty lines around method bodies.
|
89
|
+
Layout/EmptyLinesAroundMethodBody:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
# Keeps track of empty lines around module bodies.
|
93
|
+
Layout/EmptyLinesAroundModuleBody:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
# Align ends correctly.
|
97
|
+
Layout/EndAlignment:
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
# Use Unix-style line endings.
|
101
|
+
Layout/EndOfLine:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
# Checks for extra/unnecessary whitespace.
|
105
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
106
|
+
Layout/ExtraSpacing:
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
# Checks the indentation of the first argument in a method call.
|
110
|
+
Layout/FirstArgumentIndentation:
|
111
|
+
EnforcedStyle: consistent
|
112
|
+
|
113
|
+
# Checks the indentation of the first element in an array literal where the
|
114
|
+
# opening bracket and the first element are on separate lines.
|
115
|
+
Layout/FirstArrayElementIndentation:
|
116
|
+
EnforcedStyle: consistent
|
117
|
+
|
118
|
+
# Checks the indentation of the first key in a hash literal where the opening
|
119
|
+
# brace and the first key are on separate lines.
|
120
|
+
Layout/FirstHashElementIndentation:
|
121
|
+
EnforcedStyle: consistent
|
122
|
+
|
123
|
+
# Checks for a line break before the first parameter in a multi-line method
|
124
|
+
# parameter definition.
|
125
|
+
Layout/FirstMethodParameterLineBreak:
|
126
|
+
Enabled: true
|
127
|
+
|
128
|
+
# Align the elements of a hash literal if they span more than one line.
|
129
|
+
Layout/HashAlignment:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
# This cops checks the indentation of the here document bodies.
|
133
|
+
Layout/HeredocIndentation:
|
134
|
+
Enabled: false
|
135
|
+
|
136
|
+
# Keep indentation straight.
|
137
|
+
Layout/IndentationConsistency:
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
# No hard tabs.
|
141
|
+
Layout/IndentationStyle:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
# Use 2 spaces for indentation.
|
145
|
+
Layout/IndentationWidth:
|
146
|
+
Enabled: true
|
147
|
+
|
148
|
+
# Comments should start with a space.
|
149
|
+
Layout/LeadingCommentSpace:
|
150
|
+
Enabled: true
|
151
|
+
|
152
|
+
# Limit lines to 120 characters.
|
153
|
+
Layout/LineLength:
|
154
|
+
Enabled: true
|
155
|
+
Max: 120
|
156
|
+
AllowedPatterns: ['\s#\srubocop']
|
157
|
+
|
158
|
+
# Checks that strings broken over multiple lines (by a backslash) contain
|
159
|
+
# trailing spaces instead of leading spaces (default) or leading spaces instead
|
160
|
+
# of trailing spaces.
|
161
|
+
Layout/LineContinuationLeadingSpace:
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
# Checks that the backslash of a line continuation is separated from preceding
|
165
|
+
# text by exactly one space (default) or zero spaces.
|
166
|
+
Layout/LineContinuationSpacing:
|
167
|
+
Enabled: true
|
168
|
+
|
169
|
+
# Checks that the closing brace in an array literal is either on the same line
|
170
|
+
# as the last array element, or a new line.
|
171
|
+
Layout/MultilineArrayBraceLayout:
|
172
|
+
Enabled: true
|
173
|
+
EnforcedStyle: symmetrical
|
174
|
+
|
175
|
+
# Ensures newlines after multiline block do statements.
|
176
|
+
Layout/MultilineBlockLayout:
|
177
|
+
Enabled: true
|
178
|
+
|
179
|
+
# Checks the indentation of the next line after a line that ends with a string
|
180
|
+
# literal and a backslash.
|
181
|
+
Layout/LineEndStringConcatenationIndentation:
|
182
|
+
Enabled: true
|
183
|
+
|
184
|
+
# Checks that the closing brace in a hash literal is either on the same line as
|
185
|
+
# the last hash element, or a new line.
|
186
|
+
Layout/MultilineHashBraceLayout:
|
187
|
+
Enabled: true
|
188
|
+
EnforcedStyle: symmetrical
|
189
|
+
|
190
|
+
# Checks that the closing brace in a method call is either on the same line as
|
191
|
+
# the last method argument, or a new line.
|
192
|
+
Layout/MultilineMethodCallBraceLayout:
|
193
|
+
Enabled: false
|
194
|
+
EnforcedStyle: symmetrical
|
195
|
+
|
196
|
+
# Checks indentation of method calls with the dot operator that span more than
|
197
|
+
# one line.
|
198
|
+
Layout/MultilineMethodCallIndentation:
|
199
|
+
Enabled: false
|
200
|
+
|
201
|
+
# Checks that the closing brace in a method definition is symmetrical with
|
202
|
+
# respect to the opening brace and the method parameters.
|
203
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
204
|
+
Enabled: false
|
205
|
+
|
206
|
+
# Checks indentation of binary operations that span more than one line.
|
207
|
+
Layout/MultilineOperationIndentation:
|
208
|
+
Enabled: true
|
209
|
+
EnforcedStyle: indented
|
210
|
+
|
211
|
+
# Here we check if the parameters on a multi-line method call or
|
212
|
+
# definition are aligned.
|
213
|
+
Layout/ParameterAlignment:
|
214
|
+
EnforcedStyle: with_fixed_indentation
|
215
|
+
|
216
|
+
# Use spaces after colons.
|
217
|
+
Layout/SpaceAfterColon:
|
218
|
+
Enabled: true
|
219
|
+
|
220
|
+
# Use spaces after commas.
|
221
|
+
Layout/SpaceAfterComma:
|
222
|
+
Enabled: true
|
223
|
+
|
224
|
+
# Do not put a space between a method name and the opening parenthesis in a
|
225
|
+
# method definition.
|
226
|
+
Layout/SpaceAfterMethodName:
|
227
|
+
Enabled: true
|
228
|
+
|
229
|
+
# Tracks redundant space after the ! operator.
|
230
|
+
Layout/SpaceAfterNot:
|
231
|
+
Enabled: true
|
232
|
+
|
233
|
+
# Use spaces after semicolons.
|
234
|
+
Layout/SpaceAfterSemicolon:
|
235
|
+
Enabled: true
|
236
|
+
|
237
|
+
# Use space around equals in parameter default
|
238
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
239
|
+
Enabled: true
|
240
|
+
|
241
|
+
# Use a space around keywords if appropriate.
|
242
|
+
Layout/SpaceAroundKeyword:
|
243
|
+
Enabled: true
|
244
|
+
|
245
|
+
# Checks method call operators to not have spaces around them.
|
246
|
+
Layout/SpaceAroundMethodCallOperator:
|
247
|
+
Enabled: true
|
248
|
+
|
249
|
+
# Use a single space around operators.
|
250
|
+
Layout/SpaceAroundOperators:
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
# Checks that block braces have or don't have a space before the opening
|
254
|
+
# brace depending on configuration.
|
255
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
256
|
+
# SupportedStyles: space, no_space
|
257
|
+
Layout/SpaceBeforeBlockBraces:
|
258
|
+
Enabled: true
|
259
|
+
|
260
|
+
# Checks for space between the name of a receiver and a left brackets.
|
261
|
+
Layout/SpaceBeforeBrackets:
|
262
|
+
Enabled: true
|
263
|
+
|
264
|
+
# No spaces before commas.
|
265
|
+
Layout/SpaceBeforeComma:
|
266
|
+
Enabled: true
|
267
|
+
|
268
|
+
# Checks for missing space between code and a comment on the same line.
|
269
|
+
Layout/SpaceBeforeComment:
|
270
|
+
Enabled: true
|
271
|
+
|
272
|
+
# No spaces before semicolons.
|
273
|
+
Layout/SpaceBeforeSemicolon:
|
274
|
+
Enabled: true
|
275
|
+
|
276
|
+
# Checks that brackets used for array literals have or don't have
|
277
|
+
# surrounding space depending on configuration..
|
278
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
279
|
+
Enabled: true
|
280
|
+
|
281
|
+
# Use spaces inside hash literal braces - or don't.
|
282
|
+
Layout/SpaceInsideHashLiteralBraces:
|
283
|
+
Enabled: true
|
284
|
+
|
285
|
+
# Checks that reference brackets have or don't have
|
286
|
+
# surrounding space depending on configuration.
|
287
|
+
Layout/SpaceInsideReferenceBrackets:
|
288
|
+
Enabled: true
|
289
|
+
|
290
|
+
# No spaces inside range literals.
|
291
|
+
Layout/SpaceInsideRangeLiteral:
|
292
|
+
Enabled: true
|
293
|
+
|
294
|
+
# Checks for padding/surrounding spaces inside string interpolation.
|
295
|
+
Layout/SpaceInsideStringInterpolation:
|
296
|
+
EnforcedStyle: no_space
|
297
|
+
Enabled: true
|
298
|
+
|
299
|
+
# Checks trailing blank lines and final newline.
|
300
|
+
Layout/TrailingEmptyLines:
|
301
|
+
Enabled: true
|
302
|
+
|
303
|
+
# Avoid trailing whitespace.
|
304
|
+
Layout/TrailingWhitespace:
|
305
|
+
Enabled: true
|
306
|
+
|