scc-codestyle 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_disabled.yml +115 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/default.yml +571 -0
- data/lib/scc/codestyle/version.rb +5 -0
- data/lib/scc/codestyle.rb +7 -0
- data/scc-codestyle.gemspec +26 -0
- metadata +123 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ea4e8d16bf23d147ea3c8f836f4580be5a765058
|
4
|
+
data.tar.gz: 7bbb97c846a81638e4d33dce30fed1c45fefd75d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7c4733f1f620c36daba0e5f22fee0252eaebd3bcc1fc99d01ba03603e8ff122bf37b1f6503e4d439a1758404e1f99668f03df0d37d0f9b558c73e35db64324f8
|
7
|
+
data.tar.gz: 228e991aa1f6846cfea7a05681276d2da1c182520eabb01abad80e298c7e4b380d00f8ec86e039b373cee6d5dc64790d54811a782f3a458cfccada1e6138ebbc
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# These are all the cops that are disabled in Rubocop's default configuration.
|
2
|
+
# Source: https://github.com/bbatsov/rubocop/blob/master/config/disabled.yml
|
3
|
+
|
4
|
+
Layout/FirstArrayElementLineBreak:
|
5
|
+
Description: >-
|
6
|
+
Checks for a line break before the first element in a
|
7
|
+
multi-line array.
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Layout/FirstHashElementLineBreak:
|
11
|
+
Description: >-
|
12
|
+
Checks for a line break before the first element in a
|
13
|
+
multi-line hash.
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Layout/FirstMethodArgumentLineBreak:
|
17
|
+
Description: >-
|
18
|
+
Checks for a line break before the first argument in a
|
19
|
+
multi-line method call.
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Layout/FirstMethodParameterLineBreak:
|
23
|
+
Description: >-
|
24
|
+
Checks for a line break before the first parameter in a
|
25
|
+
multi-line method parameter definition.
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Layout/MultilineAssignmentLayout:
|
29
|
+
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
30
|
+
StyleGuide: '#indent-conditional-assignment'
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
# By default, the rails cops are not run. Override in project or home
|
34
|
+
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
35
|
+
Rails:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Rails/SaveBang:
|
39
|
+
Description: 'Identifies possible cases where Active Record save! or related should be used.'
|
40
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#save-bang'
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
Style/AutoResourceCleanup:
|
44
|
+
Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Style/CollectionMethods:
|
48
|
+
Description: 'Preferred collection methods.'
|
49
|
+
StyleGuide: '#map-find-select-reduce-size'
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
Style/Copyright:
|
53
|
+
Description: 'Include a copyright notice in each file before any code.'
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Style/DocumentationMethod:
|
57
|
+
Description: 'Public methods.'
|
58
|
+
Enabled: false
|
59
|
+
Exclude:
|
60
|
+
- 'spec/**/*'
|
61
|
+
- 'test/**/*'
|
62
|
+
|
63
|
+
Style/ImplicitRuntimeError:
|
64
|
+
Description: >-
|
65
|
+
Use `raise` or `fail` with an explicit exception class and
|
66
|
+
message, rather than just a message.
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/InlineComment:
|
70
|
+
Description: 'Avoid trailing inline comments.'
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Style/MethodCallWithArgsParentheses:
|
74
|
+
Description: 'Use parentheses for method calls with arguments.'
|
75
|
+
StyleGuide: '#method-invocation-parens'
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Style/MethodCalledOnDoEndBlock:
|
79
|
+
Description: 'Avoid chaining a method call on a do...end block.'
|
80
|
+
StyleGuide: '#single-line-blocks'
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Style/MissingElse:
|
84
|
+
Description: >-
|
85
|
+
Require if/case expressions to have an else branches.
|
86
|
+
If enabled, it is recommended that
|
87
|
+
Style/UnlessElse and Style/EmptyElse be enabled.
|
88
|
+
This will conflict with Style/EmptyElse if
|
89
|
+
Style/EmptyElse is configured to style "both"
|
90
|
+
Enabled: false
|
91
|
+
EnforcedStyle: both
|
92
|
+
SupportedStyles:
|
93
|
+
# if - warn when an if expression is missing an else branch
|
94
|
+
# case - warn when a case expression is missing an else branch
|
95
|
+
# both - warn when an if or case expression is missing an else branch
|
96
|
+
- if
|
97
|
+
- case
|
98
|
+
- both
|
99
|
+
|
100
|
+
Style/OptionHash:
|
101
|
+
Description: "Don't use option hashes when you can use keyword arguments."
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
Style/Send:
|
105
|
+
Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
|
106
|
+
StyleGuide: '#prefer-public-send'
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
Style/StringMethods:
|
110
|
+
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
111
|
+
Enabled: false
|
112
|
+
|
113
|
+
Style/SingleLineBlockParams:
|
114
|
+
Description: 'Enforces the names of some block params.'
|
115
|
+
Enabled: false
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 SUSE Linux GmbH
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Scc::Codestyle
|
2
|
+
|
3
|
+
Shared Ruby style guide used by the SCC Team.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
group :test, :development do
|
11
|
+
gem 'scc-codestyle'
|
12
|
+
end
|
13
|
+
```
|
14
|
+
|
15
|
+
You do not need to include RuboCop directly in your application's dependencies. Scc::Codestyle will include a specific version of `rubocop` and `rubocop-rspec` that is shared across all projects.
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
Create a `.rubocop.yml` with the following directives:
|
20
|
+
|
21
|
+
```yaml
|
22
|
+
inherit_gem:
|
23
|
+
scc-codestyle:
|
24
|
+
- default.yml
|
25
|
+
```
|
26
|
+
|
27
|
+
Now, run:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
$ bundle exec rubocop
|
31
|
+
```
|
32
|
+
|
33
|
+
You can also automatically generate a `.rubocop_todo.yml` file to temporarily ignore failing cops until the offenses are removed from your code base. Run:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
$ bundle exec rubocop --auto-gen-config
|
37
|
+
```
|
38
|
+
|
39
|
+
And add this to `.rubocop.yml` below the previous block:
|
40
|
+
|
41
|
+
```yaml
|
42
|
+
inherit_from: .rubocop_todo.yml
|
43
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/default.yml
ADDED
@@ -0,0 +1,571 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
DisplayCopNames: true
|
4
|
+
DisplayStyleGuide: true
|
5
|
+
ExtraDetails: true
|
6
|
+
Include:
|
7
|
+
- Gemfile
|
8
|
+
- Rakefile
|
9
|
+
- config.ru
|
10
|
+
- '**/*.rake'
|
11
|
+
Exclude:
|
12
|
+
- .bundle/**/*
|
13
|
+
- db/schema.rb
|
14
|
+
- features/**/*
|
15
|
+
- vendor/**/*
|
16
|
+
- tmp/**/*
|
17
|
+
- lib/locale/*
|
18
|
+
|
19
|
+
require: rubocop-rspec
|
20
|
+
|
21
|
+
# TODO: These three checks are ruby 2.3-only. Let's discuss them after we've upgraded
|
22
|
+
Rails/SafeNavigation:
|
23
|
+
Enabled: false
|
24
|
+
Style/SafeNavigation:
|
25
|
+
Enabled: false
|
26
|
+
Style/NumericPredicate:
|
27
|
+
Enabled: false
|
28
|
+
Layout/IndentHeredoc:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
# TODO: team wants to have this enabled (2017-07-13)
|
32
|
+
# This cop is quite some work. Last time we checked we had 63 offenses and each would need a 'rubocop:disable' (no one will ever improve them then) or a proper fix.
|
33
|
+
# We should do that with caution. Maybe as a separate (Demolition Squad?) card.
|
34
|
+
# Configuration parameters: Blacklist.
|
35
|
+
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
|
36
|
+
Rails/SkipsModelValidations:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Bundler/DuplicatedGem:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Bundler/OrderedGems:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Style/SignalException:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/SymbolLiteral:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Layout/SpaceAroundOperators:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
Style/ParallelAssignment:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Style/ParenthesesAroundCondition:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/NumericLiterals:
|
64
|
+
MinDigits: 14
|
65
|
+
|
66
|
+
Style/Not:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Style/Next:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Layout/ClosingParenthesisIndentation:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Style/WordArray:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Layout/SpaceAfterComma:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/SpaceInsideBrackets:
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
Layout/SpaceInsideParens:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Layout/SpaceBeforeFirstArg:
|
88
|
+
Enabled: true
|
89
|
+
AllowForAlignment: false
|
90
|
+
|
91
|
+
Layout/MultilineOperationIndentation:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Style/MethodDefParentheses:
|
95
|
+
Enabled: true
|
96
|
+
|
97
|
+
Style/MethodCallWithoutArgsParentheses:
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
Style/LineEndConcatenation:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
Layout/LeadingCommentSpace:
|
104
|
+
Enabled: true
|
105
|
+
|
106
|
+
Layout/AlignArray:
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Layout/AlignHash:
|
110
|
+
Enabled: true
|
111
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
112
|
+
|
113
|
+
Layout/CaseIndentation:
|
114
|
+
Enabled: true
|
115
|
+
|
116
|
+
Style/GuardClause:
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
Style/HashSyntax:
|
120
|
+
EnforcedStyle: ruby19
|
121
|
+
|
122
|
+
Style/RedundantSelf:
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
Lint/DeprecatedClassMethods:
|
126
|
+
Enabled: true
|
127
|
+
|
128
|
+
Style/NilComparison:
|
129
|
+
Enabled: true
|
130
|
+
|
131
|
+
Layout/EmptyLineBetweenDefs:
|
132
|
+
Enabled: true
|
133
|
+
|
134
|
+
Layout/EmptyLines:
|
135
|
+
Enabled: false
|
136
|
+
|
137
|
+
Layout/EmptyLinesAroundAccessModifier:
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Layout/EmptyLinesAroundClassBody:
|
141
|
+
Enabled: true
|
142
|
+
EnforcedStyle: empty_lines
|
143
|
+
|
144
|
+
Style/EmptyLiteral:
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Style/For:
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Lint/AssignmentInCondition:
|
151
|
+
Enabled: true
|
152
|
+
|
153
|
+
Lint/BlockAlignment:
|
154
|
+
Enabled: true
|
155
|
+
|
156
|
+
Lint/LiteralInCondition:
|
157
|
+
Enabled: true
|
158
|
+
|
159
|
+
Lint/Loop:
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
Lint/ParenthesesAsGroupedExpression:
|
163
|
+
Enabled: true
|
164
|
+
|
165
|
+
Lint/RescueException:
|
166
|
+
Enabled: true
|
167
|
+
|
168
|
+
Lint/ShadowingOuterLocalVariable:
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
Lint/UnusedBlockArgument:
|
172
|
+
Enabled: true
|
173
|
+
|
174
|
+
Lint/UnusedMethodArgument:
|
175
|
+
Enabled: true
|
176
|
+
|
177
|
+
Lint/UselessAssignment:
|
178
|
+
Enabled: true
|
179
|
+
|
180
|
+
Lint/Void:
|
181
|
+
Enabled: true
|
182
|
+
|
183
|
+
Style/StringLiterals:
|
184
|
+
Enabled: true
|
185
|
+
|
186
|
+
Lint/AmbiguousRegexpLiteral:
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
Lint/Debugger:
|
190
|
+
Enabled: true
|
191
|
+
|
192
|
+
Lint/EndAlignment:
|
193
|
+
Enabled: true
|
194
|
+
|
195
|
+
Lint/HandleExceptions:
|
196
|
+
Enabled: true
|
197
|
+
|
198
|
+
Lint/StringConversionInInterpolation:
|
199
|
+
Enabled: true
|
200
|
+
|
201
|
+
Lint/UnneededDisable:
|
202
|
+
Enabled: true
|
203
|
+
|
204
|
+
Layout/SpaceInsideHashLiteralBraces:
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
Layout/SpaceInsideBlockBraces:
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
Layout/SpaceBeforeBlockBraces:
|
211
|
+
Enabled: true
|
212
|
+
|
213
|
+
Style/BracesAroundHashParameters:
|
214
|
+
Enabled: false
|
215
|
+
|
216
|
+
Layout/TrailingBlankLines:
|
217
|
+
Enabled: true
|
218
|
+
|
219
|
+
Layout/TrailingWhitespace:
|
220
|
+
Enabled: true
|
221
|
+
|
222
|
+
Lint/UnderscorePrefixedVariableName:
|
223
|
+
Enabled: true
|
224
|
+
|
225
|
+
Lint/UselessAccessModifier:
|
226
|
+
Enabled: true
|
227
|
+
|
228
|
+
Metrics/AbcSize:
|
229
|
+
Enabled: true
|
230
|
+
Max: 80
|
231
|
+
|
232
|
+
Metrics/BlockLength:
|
233
|
+
Enabled: false
|
234
|
+
|
235
|
+
Metrics/BlockNesting:
|
236
|
+
Enabled: true
|
237
|
+
Max: 3
|
238
|
+
|
239
|
+
Metrics/ClassLength:
|
240
|
+
Enabled: true
|
241
|
+
Max: 160
|
242
|
+
|
243
|
+
Metrics/CyclomaticComplexity:
|
244
|
+
Enabled: true
|
245
|
+
Max: 10
|
246
|
+
|
247
|
+
Style/CommentAnnotation:
|
248
|
+
Enabled: true
|
249
|
+
|
250
|
+
Layout/CommentIndentation:
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Style/PreferredHashMethods:
|
254
|
+
Enabled: true
|
255
|
+
|
256
|
+
Style/Documentation:
|
257
|
+
Enabled: false
|
258
|
+
|
259
|
+
Layout/DotPosition:
|
260
|
+
Enabled: true
|
261
|
+
|
262
|
+
Lint/AmbiguousOperator:
|
263
|
+
Enabled: true
|
264
|
+
|
265
|
+
Metrics/LineLength:
|
266
|
+
Enabled: true
|
267
|
+
Max: 160
|
268
|
+
|
269
|
+
Metrics/MethodLength:
|
270
|
+
Enabled: true
|
271
|
+
Max: 50
|
272
|
+
|
273
|
+
Metrics/ParameterLists:
|
274
|
+
Enabled: true
|
275
|
+
CountKeywordArgs: false
|
276
|
+
|
277
|
+
Metrics/PerceivedComplexity:
|
278
|
+
Enabled: true
|
279
|
+
Max: 12
|
280
|
+
|
281
|
+
Style/Alias:
|
282
|
+
Enabled: true
|
283
|
+
|
284
|
+
Layout/AlignParameters:
|
285
|
+
Enabled: false
|
286
|
+
|
287
|
+
Style/AndOr:
|
288
|
+
Enabled: true
|
289
|
+
EnforcedStyle: conditionals
|
290
|
+
|
291
|
+
Style/AsciiComments:
|
292
|
+
Enabled: true
|
293
|
+
|
294
|
+
Style/ClassAndModuleChildren:
|
295
|
+
Enabled: false
|
296
|
+
|
297
|
+
Style/DoubleNegation:
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
Layout/EmptyLinesAroundMethodBody:
|
301
|
+
Enabled: false
|
302
|
+
|
303
|
+
Layout/EmptyLinesAroundModuleBody:
|
304
|
+
Enabled: false
|
305
|
+
|
306
|
+
Style/IfUnlessModifier:
|
307
|
+
Enabled: true
|
308
|
+
|
309
|
+
Style/FormatString:
|
310
|
+
Enabled: false
|
311
|
+
|
312
|
+
Layout/IndentArray:
|
313
|
+
Enabled: true
|
314
|
+
EnforcedStyle: consistent
|
315
|
+
|
316
|
+
Layout/IndentHash:
|
317
|
+
Enabled: true
|
318
|
+
EnforcedStyle: consistent
|
319
|
+
|
320
|
+
Layout/IndentationConsistency:
|
321
|
+
Enabled: true
|
322
|
+
|
323
|
+
Layout/IndentationWidth:
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
Style/Lambda:
|
327
|
+
Enabled: true
|
328
|
+
|
329
|
+
Style/PredicateName:
|
330
|
+
Enabled: false
|
331
|
+
|
332
|
+
Style/RaiseArgs:
|
333
|
+
Enabled: false
|
334
|
+
|
335
|
+
Style/RedundantReturn:
|
336
|
+
Enabled: true
|
337
|
+
|
338
|
+
Style/RegexpLiteral:
|
339
|
+
Enabled: true
|
340
|
+
|
341
|
+
Style/RescueModifier:
|
342
|
+
Enabled: false
|
343
|
+
|
344
|
+
Style/Semicolon:
|
345
|
+
Enabled: true
|
346
|
+
|
347
|
+
Layout/SpaceAfterMethodName:
|
348
|
+
Enabled: true
|
349
|
+
|
350
|
+
Style/SymbolProc:
|
351
|
+
Enabled: true
|
352
|
+
|
353
|
+
Style/TrailingCommaInLiteral:
|
354
|
+
Enabled: true
|
355
|
+
|
356
|
+
Style/TrailingCommaInArguments:
|
357
|
+
Enabled: true
|
358
|
+
|
359
|
+
Style/TrivialAccessors:
|
360
|
+
Enabled: true
|
361
|
+
|
362
|
+
Layout/Tab:
|
363
|
+
Enabled: true
|
364
|
+
|
365
|
+
Performance/StringReplacement:
|
366
|
+
Enabled: true
|
367
|
+
|
368
|
+
Layout/ExtraSpacing:
|
369
|
+
Enabled: true
|
370
|
+
|
371
|
+
Style/NestedParenthesizedCalls:
|
372
|
+
Enabled: false
|
373
|
+
|
374
|
+
Layout/MultilineMethodCallIndentation:
|
375
|
+
Enabled: false
|
376
|
+
|
377
|
+
Style/ConditionalAssignment:
|
378
|
+
Enabled: true
|
379
|
+
|
380
|
+
Layout/MultilineArrayBraceLayout:
|
381
|
+
Enabled: true
|
382
|
+
|
383
|
+
Style/RedundantParentheses:
|
384
|
+
Enabled: true
|
385
|
+
|
386
|
+
Layout/MultilineMethodCallBraceLayout:
|
387
|
+
Enabled: true
|
388
|
+
|
389
|
+
Layout/MultilineHashBraceLayout:
|
390
|
+
Enabled: true
|
391
|
+
|
392
|
+
Style/ZeroLengthPredicate:
|
393
|
+
Enabled: true
|
394
|
+
|
395
|
+
Style/UnneededInterpolation:
|
396
|
+
Enabled: true
|
397
|
+
|
398
|
+
Style/MutableConstant:
|
399
|
+
Enabled: true
|
400
|
+
|
401
|
+
Style/IdenticalConditionalBranches:
|
402
|
+
Enabled: true
|
403
|
+
|
404
|
+
Style/EmptyCaseCondition:
|
405
|
+
Enabled: true
|
406
|
+
|
407
|
+
Style/IfInsideElse:
|
408
|
+
Enabled: true
|
409
|
+
|
410
|
+
Style/FrozenStringLiteralComment:
|
411
|
+
Enabled: false
|
412
|
+
|
413
|
+
Style/TernaryParentheses:
|
414
|
+
Enabled: true
|
415
|
+
EnforcedStyle: require_parentheses_when_complex
|
416
|
+
|
417
|
+
Lint/IneffectiveAccessModifier:
|
418
|
+
Enabled: true
|
419
|
+
|
420
|
+
Performance/StartWith:
|
421
|
+
Enabled: true
|
422
|
+
|
423
|
+
Performance/RedundantMatch:
|
424
|
+
Enabled: true
|
425
|
+
|
426
|
+
Rails:
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
Rails/ActionFilter:
|
430
|
+
Enabled: true
|
431
|
+
|
432
|
+
Rails/Date:
|
433
|
+
Enabled: true
|
434
|
+
|
435
|
+
Rails/Delegate:
|
436
|
+
Enabled: true
|
437
|
+
|
438
|
+
Rails/FindBy:
|
439
|
+
Enabled: true
|
440
|
+
|
441
|
+
Rails/FindEach:
|
442
|
+
Enabled: true
|
443
|
+
|
444
|
+
Rails/HasAndBelongsToMany:
|
445
|
+
Enabled: false
|
446
|
+
|
447
|
+
Rails/Output:
|
448
|
+
Enabled: true
|
449
|
+
|
450
|
+
Rails/PluralizationGrammar:
|
451
|
+
Enabled: true
|
452
|
+
|
453
|
+
Rails/ReadWriteAttribute:
|
454
|
+
Enabled: true
|
455
|
+
|
456
|
+
Rails/ScopeArgs:
|
457
|
+
Enabled: true
|
458
|
+
|
459
|
+
Rails/TimeZone:
|
460
|
+
Enabled: true
|
461
|
+
|
462
|
+
Rails/Validation:
|
463
|
+
Enabled: true
|
464
|
+
|
465
|
+
Rails/OutputSafety:
|
466
|
+
Enabled: true
|
467
|
+
|
468
|
+
Rails/UniqBeforePluck:
|
469
|
+
Enabled: false
|
470
|
+
|
471
|
+
Style/VariableNumber:
|
472
|
+
Enabled: true
|
473
|
+
EnforcedStyle: normalcase
|
474
|
+
|
475
|
+
Style/NumericLiteralPrefix:
|
476
|
+
Enabled: true
|
477
|
+
|
478
|
+
RSpec/BeEql:
|
479
|
+
Enabled: true
|
480
|
+
|
481
|
+
RSpec/DescribeClass:
|
482
|
+
Enabled: true
|
483
|
+
|
484
|
+
RSpec/DescribeSymbol:
|
485
|
+
Enabled: true
|
486
|
+
|
487
|
+
RSpec/DescribedClass:
|
488
|
+
Enabled: true
|
489
|
+
|
490
|
+
RSpec/EmptyExampleGroup:
|
491
|
+
Enabled: false
|
492
|
+
|
493
|
+
Style/EmptyMethod:
|
494
|
+
Enabled: true
|
495
|
+
EnforcedStyle: expanded
|
496
|
+
|
497
|
+
Style/MultilineIfModifier:
|
498
|
+
Enabled: true
|
499
|
+
|
500
|
+
Layout/SpaceInLambdaLiteral:
|
501
|
+
Enabled: true
|
502
|
+
|
503
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
504
|
+
Enabled: true
|
505
|
+
|
506
|
+
Style/MultilineMemoization:
|
507
|
+
Enabled: true
|
508
|
+
|
509
|
+
Rails/DynamicFindBy:
|
510
|
+
Enabled: true
|
511
|
+
|
512
|
+
Rails/HttpPositionalArguments:
|
513
|
+
Enabled: true
|
514
|
+
|
515
|
+
Lint/EnsureReturn:
|
516
|
+
Enabled: true
|
517
|
+
|
518
|
+
Lint/AmbiguousBlockAssociation:
|
519
|
+
Enabled: false
|
520
|
+
|
521
|
+
Rails/Blank:
|
522
|
+
Enabled: true
|
523
|
+
|
524
|
+
Style/SymbolArray:
|
525
|
+
Enabled: true
|
526
|
+
|
527
|
+
Style/InverseMethods:
|
528
|
+
Enabled: true
|
529
|
+
|
530
|
+
Style/MixinGrouping:
|
531
|
+
Enabled: true
|
532
|
+
|
533
|
+
Layout/EmptyLineAfterMagicComment:
|
534
|
+
Enabled: true
|
535
|
+
|
536
|
+
RSpec/EmptyLineAfterSubject:
|
537
|
+
Enabled: true
|
538
|
+
Exclude:
|
539
|
+
- spec/models/siebel/activity_spec.rb
|
540
|
+
|
541
|
+
Rails/FilePath:
|
542
|
+
Enabled: true
|
543
|
+
|
544
|
+
Rails/Present:
|
545
|
+
Enabled: true
|
546
|
+
|
547
|
+
Style/FileName:
|
548
|
+
Enabled: true
|
549
|
+
Exclude:
|
550
|
+
- Guardfile
|
551
|
+
|
552
|
+
Style/PercentLiteralDelimiters:
|
553
|
+
Enabled: true
|
554
|
+
|
555
|
+
RSpec/ExampleWording:
|
556
|
+
Enabled: true
|
557
|
+
|
558
|
+
RSpec/FilePath:
|
559
|
+
Enabled: true
|
560
|
+
|
561
|
+
RSpec/EmptyLineAfterFinalLet:
|
562
|
+
Enabled: true
|
563
|
+
|
564
|
+
RSpec/ExampleLength:
|
565
|
+
Enabled: true
|
566
|
+
Max: 16
|
567
|
+
Exclude:
|
568
|
+
- spec/features/**/*
|
569
|
+
|
570
|
+
RSpec/AnyInstance:
|
571
|
+
Enabled: false
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'scc/codestyle/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'scc-codestyle'
|
9
|
+
spec.version = Scc::Codestyle::VERSION
|
10
|
+
spec.licenses = ['MIT']
|
11
|
+
spec.authors = ['SCC Team']
|
12
|
+
spec.email = ['scc@suse.com']
|
13
|
+
|
14
|
+
spec.summary = 'SCC style guides and shared style configs.'
|
15
|
+
spec.homepage = 'https://github.com/SUSE/scc-codestyle'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_dependency 'rubocop', '~> 0.49', '>= 0.49.0'
|
23
|
+
spec.add_dependency 'rubocop-rspec', '~> 1.15', '>= 0.15.0'
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scc-codestyle
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- SCC Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.49'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.49.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.49'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.49.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rubocop-rspec
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.15'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.15.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.15'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.15.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: bundler
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.15'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '1.15'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rake
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '10.0'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '10.0'
|
81
|
+
description:
|
82
|
+
email:
|
83
|
+
- scc@suse.com
|
84
|
+
executables: []
|
85
|
+
extensions: []
|
86
|
+
extra_rdoc_files: []
|
87
|
+
files:
|
88
|
+
- ".gitignore"
|
89
|
+
- ".rubocop.yml"
|
90
|
+
- ".rubocop_disabled.yml"
|
91
|
+
- Gemfile
|
92
|
+
- LICENSE
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- default.yml
|
96
|
+
- lib/scc/codestyle.rb
|
97
|
+
- lib/scc/codestyle/version.rb
|
98
|
+
- scc-codestyle.gemspec
|
99
|
+
homepage: https://github.com/SUSE/scc-codestyle
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 2.6.11
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: SCC style guides and shared style configs.
|
123
|
+
test_files: []
|