gitlab-styles 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/README.md +31 -12
- data/lib/gitlab/styles/version.rb +1 -1
- data/{default.yml → rubocop-default.yml} +49 -47
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a42799e70b411a155cfd1c8560070ec9d392b27
|
4
|
+
data.tar.gz: ff2d1e7abf77741598dd6b3daf7ae72ac070c01e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 062e71d3c7368f5b579a2f310d30d5fcdf9e7cfaf5c5a0b1ebea68745ea39dd15c8f470c30292119a37ce0bc95704a7337e0d715792fd5772ba53d7bef4213e5
|
7
|
+
data.tar.gz: 16be6ea7882ca778c10fea2710f795c021aae30a3cfb7f32fc9f1da8ad91c8eb4c8dd457d97977c6f68cfb7cf70876ef153420cc0f1e3c1331597753fb37ad8c
|
data/.rubocop.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
inherit_from: default.yml
|
1
|
+
inherit_from: rubocop-default.yml
|
data/README.md
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
# Gitlab::
|
1
|
+
# Gitlab::Styles
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
`Gitlab::Styles` centralizes some shared GitLab's styles config (only RuboCop
|
4
|
+
for now), as well as custom RuboCop cops.
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
9
8
|
Add this line to your application's Gemfile:
|
10
9
|
|
11
10
|
```ruby
|
12
|
-
gem 'gitlab-
|
11
|
+
gem 'gitlab-styles', require: false
|
13
12
|
```
|
14
13
|
|
15
14
|
And then execute:
|
@@ -18,26 +17,46 @@ And then execute:
|
|
18
17
|
|
19
18
|
Or install it yourself as:
|
20
19
|
|
21
|
-
$ gem install gitlab-
|
20
|
+
$ gem install gitlab-styles
|
22
21
|
|
23
22
|
## Usage
|
24
23
|
|
25
|
-
|
24
|
+
### RuboCop
|
25
|
+
|
26
|
+
Include the following in your `.rubocop.yml` and remove all the rules that are
|
27
|
+
already in `rubocop-default.yml`:
|
28
|
+
|
29
|
+
```yaml
|
30
|
+
inherit_gem:
|
31
|
+
gitlab-rubocop:
|
32
|
+
- rubocop-default.yml
|
33
|
+
```
|
26
34
|
|
27
35
|
## Development
|
28
36
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies.
|
37
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
38
|
+
Then, run `rake spec` to run the tests. You can also run `bin/console` for an
|
39
|
+
interactive prompt that will allow you to experiment.
|
30
40
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To
|
41
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
42
|
+
release a new version, update the version number in `version.rb`, and then run
|
43
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
44
|
+
git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
45
|
|
33
46
|
## Contributing
|
34
47
|
|
35
|
-
Bug reports and
|
48
|
+
Bug reports and merge requests are welcome on GitLab at
|
49
|
+
https://gitlab.com/gitlab-org/gitlab-styles. This project is intended to be a
|
50
|
+
safe, welcoming space for collaboration, and contributors are expected to adhere
|
51
|
+
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
52
|
|
37
53
|
## License
|
38
54
|
|
39
|
-
The gem is available as open source under the terms of the
|
55
|
+
The gem is available as open source under the terms of the
|
56
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
40
57
|
|
41
58
|
## Code of Conduct
|
42
59
|
|
43
|
-
Everyone interacting in the Gitlab::
|
60
|
+
Everyone interacting in the `Gitlab::Styles` project’s codebases, issue trackers,
|
61
|
+
chat rooms and mailing lists is expected to follow the
|
62
|
+
[code of conduct](https://gitlab.com/gitlab-org/gitlab-styles/blob/master/CODE_OF_CONDUCT.md).
|
@@ -254,12 +254,59 @@ Layout/TrailingBlankLines:
|
|
254
254
|
Layout/TrailingWhitespace:
|
255
255
|
Enabled: true
|
256
256
|
|
257
|
-
#
|
257
|
+
# Naming ######################################################################
|
258
258
|
|
259
259
|
# Check the naming of accessor methods for get_/set_.
|
260
|
-
|
260
|
+
Naming/AccessorMethodName:
|
261
261
|
Enabled: false
|
262
262
|
|
263
|
+
# Use only ascii symbols in identifiers.
|
264
|
+
Naming/AsciiIdentifiers:
|
265
|
+
Enabled: true
|
266
|
+
|
267
|
+
# When defining binary operators, name the argument other.
|
268
|
+
Naming/BinaryOperatorParameterName:
|
269
|
+
Enabled: true
|
270
|
+
|
271
|
+
# Use CamelCase for classes and modules.'
|
272
|
+
Naming/ClassAndModuleCamelCase:
|
273
|
+
Enabled: true
|
274
|
+
|
275
|
+
# Constants should use SCREAMING_SNAKE_CASE.
|
276
|
+
Naming/ConstantName:
|
277
|
+
Enabled: true
|
278
|
+
|
279
|
+
# Use snake_case for source file names.
|
280
|
+
Naming/FileName:
|
281
|
+
Enabled: true
|
282
|
+
|
283
|
+
# Use the configured style when naming methods.
|
284
|
+
Naming/MethodName:
|
285
|
+
Enabled: true
|
286
|
+
|
287
|
+
# Use `spam?` instead of `is_spam?`
|
288
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
289
|
+
# NamePrefix: is_, has_, have_
|
290
|
+
# NamePrefixBlacklist: is_, has_, have_
|
291
|
+
# NameWhitelist: is_a?
|
292
|
+
Naming/PredicateName:
|
293
|
+
Enabled: true
|
294
|
+
NamePrefixBlacklist: is_
|
295
|
+
Exclude:
|
296
|
+
- 'spec/**/*'
|
297
|
+
- 'features/**/*'
|
298
|
+
|
299
|
+
# Use the configured style when naming variables.
|
300
|
+
Naming/VariableName:
|
301
|
+
EnforcedStyle: snake_case
|
302
|
+
Enabled: true
|
303
|
+
|
304
|
+
# Use the configured style when numbering variables.
|
305
|
+
Naming/VariableNumber:
|
306
|
+
Enabled: false
|
307
|
+
|
308
|
+
# Style #######################################################################
|
309
|
+
|
263
310
|
# Use alias_method instead of alias.
|
264
311
|
Style/Alias:
|
265
312
|
EnforcedStyle: prefer_alias_method
|
@@ -278,10 +325,6 @@ Style/ArrayJoin:
|
|
278
325
|
Style/AsciiComments:
|
279
326
|
Enabled: true
|
280
327
|
|
281
|
-
# Use only ascii symbols in identifiers.
|
282
|
-
Style/AsciiIdentifiers:
|
283
|
-
Enabled: true
|
284
|
-
|
285
328
|
# Checks for uses of Module#attr.
|
286
329
|
Style/Attr:
|
287
330
|
Enabled: true
|
@@ -312,10 +355,6 @@ Style/CaseEquality:
|
|
312
355
|
Style/CharacterLiteral:
|
313
356
|
Enabled: true
|
314
357
|
|
315
|
-
# Use CamelCase for classes and modules.'
|
316
|
-
Style/ClassAndModuleCamelCase:
|
317
|
-
Enabled: true
|
318
|
-
|
319
358
|
# Checks style of children classes and modules.
|
320
359
|
Style/ClassAndModuleChildren:
|
321
360
|
Enabled: false
|
@@ -348,10 +387,6 @@ Style/CommentAnnotation:
|
|
348
387
|
Style/ConditionalAssignment:
|
349
388
|
Enabled: true
|
350
389
|
|
351
|
-
# Constants should use SCREAMING_SNAKE_CASE.
|
352
|
-
Style/ConstantName:
|
353
|
-
Enabled: true
|
354
|
-
|
355
390
|
# Use def with parentheses when there are arguments.
|
356
391
|
Style/DefWithParentheses:
|
357
392
|
Enabled: true
|
@@ -374,10 +409,6 @@ Style/EndBlock:
|
|
374
409
|
Style/EvenOdd:
|
375
410
|
Enabled: true
|
376
411
|
|
377
|
-
# Use snake_case for source file names.
|
378
|
-
Style/FileName:
|
379
|
-
Enabled: true
|
380
|
-
|
381
412
|
# Checks for flip flops.
|
382
413
|
Style/FlipFlop:
|
383
414
|
Enabled: true
|
@@ -432,10 +463,6 @@ Style/LambdaCall:
|
|
432
463
|
Style/MethodDefParentheses:
|
433
464
|
Enabled: true
|
434
465
|
|
435
|
-
# Use the configured style when naming methods.
|
436
|
-
Style/MethodName:
|
437
|
-
Enabled: true
|
438
|
-
|
439
466
|
# Checks for usage of `extend self` in modules.
|
440
467
|
Style/ModuleFunction:
|
441
468
|
Enabled: false
|
@@ -498,10 +525,6 @@ Style/NumericLiterals:
|
|
498
525
|
Style/OneLineConditional:
|
499
526
|
Enabled: true
|
500
527
|
|
501
|
-
# When defining binary operators, name the argument other.
|
502
|
-
Naming/BinaryOperatorParameterName:
|
503
|
-
Enabled: true
|
504
|
-
|
505
528
|
# Don't use parentheses around the condition of an if/unless/while.
|
506
529
|
Style/ParenthesesAroundCondition:
|
507
530
|
Enabled: true
|
@@ -573,15 +596,6 @@ Style/UnneededPercentQ:
|
|
573
596
|
Style/VariableInterpolation:
|
574
597
|
Enabled: true
|
575
598
|
|
576
|
-
# Use the configured style when naming variables.
|
577
|
-
Style/VariableName:
|
578
|
-
EnforcedStyle: snake_case
|
579
|
-
Enabled: true
|
580
|
-
|
581
|
-
# Use the configured style when numbering variables.
|
582
|
-
Style/VariableNumber:
|
583
|
-
Enabled: false
|
584
|
-
|
585
599
|
# Use when x then ... for one-line cases.
|
586
600
|
Style/WhenThen:
|
587
601
|
Enabled: true
|
@@ -606,18 +620,6 @@ Style/YodaCondition:
|
|
606
620
|
Style/Proc:
|
607
621
|
Enabled: true
|
608
622
|
|
609
|
-
# Use `spam?` instead of `is_spam?`
|
610
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
611
|
-
# NamePrefix: is_, has_, have_
|
612
|
-
# NamePrefixBlacklist: is_, has_, have_
|
613
|
-
# NameWhitelist: is_a?
|
614
|
-
Style/PredicateName:
|
615
|
-
Enabled: true
|
616
|
-
NamePrefixBlacklist: is_
|
617
|
-
Exclude:
|
618
|
-
- 'spec/**/*'
|
619
|
-
- 'features/**/*'
|
620
|
-
|
621
623
|
# Metrics #####################################################################
|
622
624
|
|
623
625
|
# A calculated magnitude based on number of assignments,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-styles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- Rakefile
|
113
113
|
- bin/console
|
114
114
|
- bin/setup
|
115
|
-
- default.yml
|
116
115
|
- gitlab-styles.gemspec
|
117
116
|
- lib/gitlab/styles.rb
|
118
117
|
- lib/gitlab/styles/rubocop.rb
|
@@ -142,6 +141,7 @@ files:
|
|
142
141
|
- lib/gitlab/styles/rubocop/migration_helpers.rb
|
143
142
|
- lib/gitlab/styles/rubocop/model_helpers.rb
|
144
143
|
- lib/gitlab/styles/version.rb
|
144
|
+
- rubocop-default.yml
|
145
145
|
homepage: https://github.com/gitlab-org/gitlab-styles
|
146
146
|
licenses:
|
147
147
|
- MIT
|