rubocop-bitcrowd 1.3.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/.rubocop.yml +6 -3
- data/CHANGELOG.md +40 -5
- data/README.md +14 -5
- data/rubocop-bitcrowd.gemspec +27 -10
- metadata +21 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b0d564235084a7fde4c55f8af20c0a6cf6eec29a2801b219d44dc60decbc220
|
4
|
+
data.tar.gz: e64f7ea8be218c6da19eec860bafe82aaf627b43d6a25f23bb246d2c5e19b0b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 384c691163b3732a63b7bc761017121aa0a3676e52462b2d7fe645f47905899cb0f8e6746edf87bd09dcd5def7fc7a9174ba4e5157253c93a2eae63403d57c4f
|
7
|
+
data.tar.gz: 259b37f81b7253c3a85eea330017f7504acda2383eaf98e3ba4bb03c2a8b402a08ce5d5ab993fa5cba158761ea1b85d6354e302e307625e9488c0d54fb7b3169
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
AllCops:
|
2
|
+
# Additional exclude patterns for files that should not be analyzed.
|
3
|
+
# These extend the default RuboCop exclude patterns:
|
4
|
+
# https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml
|
2
5
|
Exclude:
|
3
|
-
- 'node_modules/**/*'
|
4
|
-
- 'vendor/bundle/**/*'
|
5
6
|
- 'script/**/*'
|
6
7
|
- 'db/schema.rb'
|
7
|
-
|
8
|
+
- 'tmp/**/*'
|
9
|
+
- 'storage/**/*'
|
10
|
+
- 'log/**/*'
|
8
11
|
DisplayStyleGuide: true
|
9
12
|
|
10
13
|
Documentation:
|
data/CHANGELOG.md
CHANGED
@@ -4,25 +4,60 @@ Presented in reverse chronological order.
|
|
4
4
|
|
5
5
|
## master
|
6
6
|
|
7
|
-
https://github.com/bitcrowd/rubocop-bitcrowd/compare/
|
7
|
+
https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.0.0...HEAD
|
8
8
|
|
9
9
|
*Put high-level summary here before releasing a new version*
|
10
10
|
|
11
11
|
### Deprecations:
|
12
12
|
|
13
|
-
* Put deprecations here (in a brief bullet point)
|
13
|
+
* *Put deprecations here (in a brief bullet point)*
|
14
14
|
|
15
15
|
### Potentially breaking changes:
|
16
16
|
|
17
|
-
* Put potentially breaking changes here (in a brief bullet point)
|
17
|
+
* *Put potentially breaking changes here (in a brief bullet point)*
|
18
18
|
|
19
19
|
### New features:
|
20
20
|
|
21
|
-
* Put new features here (in a brief bullet point)
|
21
|
+
* *Put new features here (in a brief bullet point)*
|
22
22
|
|
23
23
|
### Fixes:
|
24
24
|
|
25
|
-
* Put fixes here (in a brief bullet point)
|
25
|
+
* *Put fixes here (in a brief bullet point)*
|
26
|
+
|
27
|
+
## 2.0.0
|
28
|
+
|
29
|
+
https://github.com/bitcrowd/rubocop-bitcrowd/compare/v1.3.0...v2.0.0
|
30
|
+
|
31
|
+
This release changes our approach on excluding certain file paths and directories from being inspected by the linter. Instead of fully overriding RuboCop's default `AllCops:Exclude` list (which used to be necessary up until `rubocop` v0.57.0), `rubocop-bitcrowd` now only provides some extra patterns as an extension to the default list.
|
32
|
+
|
33
|
+
We in addition to the default directories, e.g. want to exclude `log`, `tmp` and `storage` in Rails projects.
|
34
|
+
|
35
|
+
In order to keep excluding both, the bitcrowd patterns and the RuboCop's default ones, add this to your `.rubocop.yml` file:
|
36
|
+
|
37
|
+
```yml
|
38
|
+
inherit_mode:
|
39
|
+
merge:
|
40
|
+
- Exclude
|
41
|
+
```
|
42
|
+
|
43
|
+
### Potentially breaking changes:
|
44
|
+
|
45
|
+
* require a rubocop version >= 0.57.0
|
46
|
+
* remove directories rubocop already excludes by default from the `AllCops:Exclude` list
|
47
|
+
* keeping the existing list now requires to add an `inherit_mode` section into their `.rubocop.yml`:
|
48
|
+
|
49
|
+
```yml
|
50
|
+
# This will merge the default exclude list with the one from rubocop-bitcrowd
|
51
|
+
inherit_mode:
|
52
|
+
merge:
|
53
|
+
- Exclude
|
54
|
+
```
|
55
|
+
|
56
|
+
### Fixes:
|
57
|
+
|
58
|
+
* Also exclude the `tmp`, `log` and `storage` directories from being inspected.
|
59
|
+
Working on a Rails application, especially the `tmp` directory fills up over time and slows down linting the project enormously. Same goes for the `storage` directory: here rubocop also has to dig through deeply nested folder structures.
|
60
|
+
Note: rubocop's "default" configuration also ignores the `tmp` directory.
|
26
61
|
|
27
62
|
## `1.3.0` (2018-10-22)
|
28
63
|
|
data/README.md
CHANGED
@@ -22,6 +22,12 @@ To use the configuration in your project create a .rubocop.yml with:
|
|
22
22
|
```yml
|
23
23
|
inherit_gem:
|
24
24
|
rubocop-bitcrowd: .rubocop.yml
|
25
|
+
|
26
|
+
# Note: skip this if you want to override the default AllCops:Include and AllCops:Exclude list
|
27
|
+
inherit_mode:
|
28
|
+
merge:
|
29
|
+
- Include
|
30
|
+
- Exclude
|
25
31
|
```
|
26
32
|
|
27
33
|
# Using rubocop-rspec
|
@@ -36,6 +42,12 @@ inherit_gem:
|
|
36
42
|
rubocop-bitcrowd:
|
37
43
|
- .rubocop.yml
|
38
44
|
- .rubocop-rspec.yml
|
45
|
+
|
46
|
+
# Note: skip this if you want to override the default AllCops:Include and AllCops:Exclude list
|
47
|
+
inherit_mode:
|
48
|
+
merge:
|
49
|
+
- Include
|
50
|
+
- Exclude
|
39
51
|
```
|
40
52
|
|
41
53
|
## Autofixing issues
|
@@ -62,11 +74,8 @@ To release a new version, follow these steps:
|
|
62
74
|
|
63
75
|
1. update the [CHANGELOG](./CHANGELOG.md) to reflect the new release and prepare a new [`master` section](./CHANGELOG.md#master)
|
64
76
|
2. update the version in `rubocop-bitcrowd.gemspec` according to [semver](https://semver.org/)
|
65
|
-
3. commit that change
|
66
|
-
4.
|
67
|
-
5. build the gem and release it to rubygems:
|
68
|
-
* `gem build rubocop-bitcrowd.gemspec`
|
69
|
-
* `gem push rubocop-bitcrowd-1.2.3.gem`
|
77
|
+
3. commit that change
|
78
|
+
4. run `rake release`
|
70
79
|
|
71
80
|
## License
|
72
81
|
|
data/rubocop-bitcrowd.gemspec
CHANGED
@@ -1,14 +1,31 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
|
-
spec.name
|
3
|
-
spec.version
|
4
|
-
spec.authors
|
5
|
-
spec.email
|
2
|
+
spec.name = 'rubocop-bitcrowd'
|
3
|
+
spec.version = '2.0.0'
|
4
|
+
spec.authors = ['bitcrowd']
|
5
|
+
spec.email = ['info@bitcrowd.net']
|
6
6
|
|
7
|
-
spec.summary
|
8
|
-
spec.description
|
9
|
-
|
10
|
-
spec.homepage
|
11
|
-
spec.license
|
7
|
+
spec.summary = 'The bitcrowd rubocop.yml as a gem.'
|
8
|
+
spec.description = 'Use this as a quick start to get rubocop with the '\
|
9
|
+
'settings we use at bitcrowd into your project'
|
10
|
+
spec.homepage = 'https://github.com/bitcrowd/rubocop-bitcrowd'
|
11
|
+
spec.license = 'MIT'
|
12
|
+
spec.post_install_message = <<~HEREDOC
|
13
|
+
|
14
|
+
This version of rubocop-bitcrowd no longer overrides RuboCop's AllCops:Exclude list.
|
15
|
+
It only adds extra patterns not included in the defaults.
|
16
|
+
|
17
|
+
Therefore if you want to keep excluding both, the bitcrowd patterns as well as the RuboCop default ones,
|
18
|
+
add this to your .rubocop.yml
|
19
|
+
inherit_mode:
|
20
|
+
merge:
|
21
|
+
- Exclude
|
22
|
+
|
23
|
+
For more details: https://rubocop.readthedocs.io/en/latest/configuration/#merging-arrays-using-inherit_mode
|
24
|
+
|
25
|
+
Cheers!
|
26
|
+
Your friends at bitcrowd
|
27
|
+
|
28
|
+
HEREDOC
|
12
29
|
|
13
30
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
14
31
|
f.match(%r{^(test|spec|features)/})
|
@@ -16,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
16
33
|
spec.bindir = 'exe'
|
17
34
|
spec.executables = 'rubocop-autofix'
|
18
35
|
|
19
|
-
spec.add_runtime_dependency 'rubocop', '~> 0.
|
36
|
+
spec.add_runtime_dependency 'rubocop', '~> 0.57.0'
|
20
37
|
|
21
38
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
22
39
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-bitcrowd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bitcrowd
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.57.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.57.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,6 +61,7 @@ executables:
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
64
65
|
- ".gitignore"
|
65
66
|
- ".rubocop-rspec.yml"
|
66
67
|
- ".rubocop.yml"
|
@@ -75,7 +76,22 @@ homepage: https://github.com/bitcrowd/rubocop-bitcrowd
|
|
75
76
|
licenses:
|
76
77
|
- MIT
|
77
78
|
metadata: {}
|
78
|
-
post_install_message:
|
79
|
+
post_install_message: |2+
|
80
|
+
|
81
|
+
This version of rubocop-bitcrowd no longer overrides RuboCop's AllCops:Exclude list.
|
82
|
+
It only adds extra patterns not included in the defaults.
|
83
|
+
|
84
|
+
Therefore if you want to keep excluding both, the bitcrowd patterns as well as the RuboCop default ones,
|
85
|
+
add this to your .rubocop.yml
|
86
|
+
inherit_mode:
|
87
|
+
merge:
|
88
|
+
- Exclude
|
89
|
+
|
90
|
+
For more details: https://rubocop.readthedocs.io/en/latest/configuration/#merging-arrays-using-inherit_mode
|
91
|
+
|
92
|
+
Cheers!
|
93
|
+
Your friends at bitcrowd
|
94
|
+
|
79
95
|
rdoc_options: []
|
80
96
|
require_paths:
|
81
97
|
- lib
|