rubocop-rootstrap 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/LICENSE.txt +21 -0
- data/README.md +95 -0
- data/config/default.yml +68 -0
- data/config/default_edge.yml +31 -0
- data/config/default_rails.yml +26 -0
- data/config/rails.yml +5 -0
- data/config/rails_edge.yml +5 -0
- data/lib/rubocop/cop/rootstrap.rb +0 -0
- metadata +107 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2912f1055344a69127b4794da099e9e6ffdbdb65ed7b6845727bd772975dd6ce
|
4
|
+
data.tar.gz: '08e8ac5e626b862f2c0e2285634ec6214dae864d75bff4da8353191aa68c9ea9'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 70dfbc8b8e179ece1c1148aad211e3fb1cb3dfe292f3b7ed249ad75389e64d0885b970bd235ae4104a5b25d662211a28f10335c2fa3b1d01b9f5fdc4d12fb754
|
7
|
+
data.tar.gz: 2371c2350ae469632e6bd3fcfef34c38724584d64707c4f678bb02114376cccf041a3ce002308804f0e0ca5b8e92c6f98d1223b2e766372dde1bddc737c0c12e
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Rootstrap
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
# RuboCop Rootstrap
|
2
|
+
|
3
|
+
This gem provides the recommended RuboCop configuration for Rootstrap projects, for open source and internal Ruby projects.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
### For Rails projects
|
8
|
+
|
9
|
+
In your gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rubocop-rootstrap'
|
13
|
+
gem 'rubocop-rails', require: false
|
14
|
+
```
|
15
|
+
|
16
|
+
And in your .rubocop.yml
|
17
|
+
|
18
|
+
```yml
|
19
|
+
inherit_gem:
|
20
|
+
rubocop-rootstrap:
|
21
|
+
- config/rails.yml
|
22
|
+
```
|
23
|
+
|
24
|
+
### For ruby projects
|
25
|
+
|
26
|
+
In your gemfile:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
gem 'rubocop-rootstrap'
|
30
|
+
```
|
31
|
+
|
32
|
+
And in your .rubocop.yml
|
33
|
+
|
34
|
+
```yml
|
35
|
+
inherit_gem:
|
36
|
+
rubocop-rootstrap:
|
37
|
+
- config/default.yml
|
38
|
+
```
|
39
|
+
|
40
|
+
### Using the latest Rubocop version
|
41
|
+
|
42
|
+
To use the latest version of Rubocop just use the edge config files:
|
43
|
+
|
44
|
+
In your .rubocop.yml
|
45
|
+
|
46
|
+
```yml
|
47
|
+
inherit_gem:
|
48
|
+
rubocop-rootstrap:
|
49
|
+
- config/default_edge.yml
|
50
|
+
```
|
51
|
+
|
52
|
+
Or for Rails apps
|
53
|
+
|
54
|
+
```yml
|
55
|
+
inherit_gem:
|
56
|
+
rubocop-rootstrap:
|
57
|
+
- config/rails_edge.yml
|
58
|
+
```
|
59
|
+
|
60
|
+
### Defining custom exclusions in our project
|
61
|
+
|
62
|
+
To define custom exclusions and not override those defined by the gem:
|
63
|
+
|
64
|
+
In your .rubocop.yml
|
65
|
+
|
66
|
+
```yml
|
67
|
+
inherit_mode:
|
68
|
+
merge:
|
69
|
+
- Exclude
|
70
|
+
```
|
71
|
+
|
72
|
+
## Writing custom cops
|
73
|
+
|
74
|
+
Check Rubocop's documentation https://docs.rubocop.org/rubocop/development.html
|
75
|
+
|
76
|
+
Cops must live inside `lib/rubocop/cop/rootstrap/` and be required in `lib/rubocop/cop/rootstrap.rb`.
|
77
|
+
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rootstrap/rubocop-rootstrap. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rootstrap/rubocop-rootstrap/blob/master/CODE_OF_CONDUCT.md).
|
81
|
+
|
82
|
+
## License
|
83
|
+
|
84
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
85
|
+
|
86
|
+
## Code of Conduct
|
87
|
+
|
88
|
+
Everyone interacting in the Rubocop::Rootstrap project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rootstrap/rubocop-rootstrap/blob/master/CODE_OF_CONDUCT.md).
|
89
|
+
|
90
|
+
## Credits
|
91
|
+
|
92
|
+
RuboCop Rootstrap is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our
|
93
|
+
[contributors](https://github.com/rootstrap/rubocop-rootstrap/contributors).
|
94
|
+
|
95
|
+
[<img src="https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png" width="100"/>](http://www.rootstrap.com)
|
data/config/default.yml
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
Documentation:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Layout/ClassStructure:
|
5
|
+
Enabled: true
|
6
|
+
|
7
|
+
Lint/AmbiguousBlockAssociation:
|
8
|
+
Exclude:
|
9
|
+
- spec/**/*
|
10
|
+
|
11
|
+
Metrics/AbcSize:
|
12
|
+
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
13
|
+
# a Float.
|
14
|
+
Max: 15
|
15
|
+
|
16
|
+
Metrics/BlockLength:
|
17
|
+
CountComments: false
|
18
|
+
Max: 25
|
19
|
+
|
20
|
+
Metrics/BlockNesting:
|
21
|
+
Max: 4
|
22
|
+
|
23
|
+
Metrics/ClassLength:
|
24
|
+
CountComments: false
|
25
|
+
Max: 200
|
26
|
+
|
27
|
+
# Avoid complex methods.
|
28
|
+
Metrics/CyclomaticComplexity:
|
29
|
+
Max: 6
|
30
|
+
|
31
|
+
Metrics/MethodLength:
|
32
|
+
CountComments: false
|
33
|
+
Max: 24
|
34
|
+
|
35
|
+
Metrics/ModuleLength:
|
36
|
+
CountComments: false
|
37
|
+
Max: 200
|
38
|
+
|
39
|
+
Metrics/LineLength:
|
40
|
+
Max: 100
|
41
|
+
# To make it possible to copy or click on URIs in the code, we allow lines
|
42
|
+
# containing a URI to be longer than Max.
|
43
|
+
AllowURI: true
|
44
|
+
URISchemes:
|
45
|
+
- http
|
46
|
+
- https
|
47
|
+
|
48
|
+
Metrics/ParameterLists:
|
49
|
+
Max: 5
|
50
|
+
CountKeywordArgs: true
|
51
|
+
|
52
|
+
Metrics/PerceivedComplexity:
|
53
|
+
Max: 12
|
54
|
+
|
55
|
+
Style/BlockDelimiters:
|
56
|
+
EnforcedStyle: braces_for_chaining
|
57
|
+
|
58
|
+
Style/ExpandPathArguments:
|
59
|
+
Enabled: false
|
60
|
+
|
61
|
+
Style/FrozenStringLiteralComment:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Style/ModuleFunction:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
Style/ReturnNil:
|
68
|
+
Enabled: true
|
@@ -0,0 +1,31 @@
|
|
1
|
+
inherit_from: default.yml
|
2
|
+
|
3
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
Layout/SpaceAroundMethodCallOperator:
|
7
|
+
Enabled: true
|
8
|
+
|
9
|
+
Lint/DeprecatedOpenSSLConstant:
|
10
|
+
Enabled: true
|
11
|
+
|
12
|
+
Lint/MixedRegexpCaptureTypes:
|
13
|
+
Enabled: true
|
14
|
+
|
15
|
+
Lint/RaiseException:
|
16
|
+
Enabled: true
|
17
|
+
|
18
|
+
Lint/StructNewOverride:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
Style/ExponentialNotation:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/RedundantRegexpCharacterClass:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Style/RedundantRegexpEscape:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/SlicingWithRange:
|
31
|
+
Enabled: false
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Rails:
|
2
|
+
Enabled: true
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
Exclude:
|
6
|
+
- db/schema.rb
|
7
|
+
- node_modules/**/*
|
8
|
+
|
9
|
+
Layout/SpaceBeforeFirstArg:
|
10
|
+
Exclude:
|
11
|
+
- app/views/api/**/**/*
|
12
|
+
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Exclude:
|
15
|
+
- config/**/*
|
16
|
+
- spec/**/*
|
17
|
+
- app/admin/**/*
|
18
|
+
|
19
|
+
Rails/Delegate:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Rails/FilePath:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Rails/SaveBang:
|
26
|
+
Enabled: true
|
data/config/rails.yml
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-rootstrap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rootstrap
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-02 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.72'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.72'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 13.0.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 13.0.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.9.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.9.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.17.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.17.1
|
69
|
+
description: Rubocop with Rootstrap's code style
|
70
|
+
email:
|
71
|
+
- info@rootstrap.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- LICENSE.txt
|
77
|
+
- README.md
|
78
|
+
- config/default.yml
|
79
|
+
- config/default_edge.yml
|
80
|
+
- config/default_rails.yml
|
81
|
+
- config/rails.yml
|
82
|
+
- config/rails_edge.yml
|
83
|
+
- lib/rubocop/cop/rootstrap.rb
|
84
|
+
homepage: https://github.com/rootstrap/rubocop-rootstrap
|
85
|
+
licenses:
|
86
|
+
- MIT
|
87
|
+
metadata: {}
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubygems_version: 3.1.2
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: RuboCop Rootstrap
|
107
|
+
test_files: []
|