rubocop-bitcrowd 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62210b3b31efa0414797d945953b00b6be165fd7665e95cc7d3426335204887f
4
- data.tar.gz: 4124398220ec85f6acd15ab476caf309f545052350c27645811b26bc701f413e
3
+ metadata.gz: 86c9da0eecaf763edb72fb430531fab0988e761cfedd2e8d0cb0e8aa793f31b0
4
+ data.tar.gz: 3cd5e6f016c8430907174eede5dd30b672922b095a520494b5ba21c57cbaba95
5
5
  SHA512:
6
- metadata.gz: 60740aa1c0d665dad8310bd3918c70919043833f67c03c4db3735bda9c92ebce940c745d416260f3817a5ed40d035517c0e734dae5d2d88f902d98d92d95b7b4
7
- data.tar.gz: 56522c53c002e97eb4815228f1b3c7ec626a3e2b9d8adfc6444227ee0f1c4ad518deb4874ccc3300d19f32ac55be16b6a8192b43cab9684410397cc7bb0477da
6
+ metadata.gz: ce06d21b81fcf2633dc70d034dbc4a4fdb4f62f132f3fe0d928e3a665141e3150e6c01c8c99f6ef824dafbe9168bab0eb90fcf7cf94730e7356d54dba1ed1277
7
+ data.tar.gz: a2dc27ee98953f2f997ff44465f0f313ce2c2e218c28a7ddb8ab9509c1593b89e427c3b8845b30a4b6e3828ed844976f494f333328776dc72b3454a402ee46ce
@@ -0,0 +1 @@
1
+ require: rubocop-performance
@@ -0,0 +1,50 @@
1
+ require: rubocop-rails
2
+
3
+ Rails/ActionFilter:
4
+ Enabled: true
5
+
6
+ Rails/Date:
7
+ Enabled: true
8
+
9
+ Rails/Delegate:
10
+ Enabled: true
11
+
12
+ Rails/FindBy:
13
+ Enabled: true
14
+
15
+ Rails/FindEach:
16
+ Enabled: true
17
+
18
+ Rails/HasAndBelongsToMany:
19
+ Enabled: true
20
+
21
+ Rails/Output:
22
+ Enabled: true
23
+
24
+ Rails/PluralizationGrammar:
25
+ Enabled: true
26
+
27
+ Rails/HttpPositionalArguments:
28
+ Enabled: true
29
+
30
+ Rails/ReadWriteAttribute:
31
+ Enabled: true
32
+
33
+ Rails/ScopeArgs:
34
+ Enabled: true
35
+
36
+ Rails/SkipsModelValidations:
37
+ Enabled: false
38
+
39
+ Rails/TimeZone:
40
+ Enabled: true
41
+
42
+ Rails/UnknownEnv:
43
+ Environments:
44
+ - development
45
+ - test
46
+ - staging
47
+ - production
48
+
49
+ Rails/Validation:
50
+ Enabled: true
@@ -16,58 +16,6 @@ Style/Documentation:
16
16
  Lint/UselessAccessModifier:
17
17
  Enabled: true
18
18
 
19
- Rails:
20
- Enabled: true
21
-
22
- Rails/ActionFilter:
23
- Enabled: true
24
-
25
- Rails/Date:
26
- Enabled: true
27
-
28
- Rails/Delegate:
29
- Enabled: true
30
-
31
- Rails/FindBy:
32
- Enabled: true
33
-
34
- Rails/FindEach:
35
- Enabled: true
36
-
37
- Rails/HasAndBelongsToMany:
38
- Enabled: true
39
-
40
- Rails/Output:
41
- Enabled: true
42
-
43
- Rails/PluralizationGrammar:
44
- Enabled: true
45
-
46
- Rails/HttpPositionalArguments:
47
- Enabled: true
48
-
49
- Rails/ReadWriteAttribute:
50
- Enabled: true
51
-
52
- Rails/ScopeArgs:
53
- Enabled: true
54
-
55
- Rails/SkipsModelValidations:
56
- Enabled: false
57
-
58
- Rails/TimeZone:
59
- Enabled: true
60
-
61
- Rails/UnknownEnv:
62
- Environments:
63
- - development
64
- - test
65
- - staging
66
- - production
67
-
68
- Rails/Validation:
69
- Enabled: true
70
-
71
19
  Style/AndOr:
72
20
  Enabled: true
73
21
 
@@ -4,7 +4,7 @@ Presented in reverse chronological order.
4
4
 
5
5
  ## master
6
6
 
7
- https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.1.3...HEAD
7
+ https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.2.0...HEAD
8
8
 
9
9
  *Put high-level summary here before releasing a new version*
10
10
 
@@ -24,6 +24,54 @@ https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.1.3...HEAD
24
24
 
25
25
  * *Put fixes here (in a brief bullet point)*
26
26
 
27
+ ## `2.2.0` (2020-03-26)
28
+
29
+ https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.2.0...HEAD
30
+
31
+ With this version update, `rubocop-bitcrowd` adapts to RuboCop's new modularized architecture of having separate gems for different cop targets (Rails, Rspec, Performance).
32
+
33
+ `rubocop-bitcrowd` includes separate configuration files for each RuboCop gem. To continue using the previous configuration including rules for Rspec and Rails, add the respective gems to your Gemfile:
34
+
35
+ ```ruby
36
+ gem 'rubocop-rails', require: false
37
+ gem 'rubocop-rspec', require: false
38
+ ```
39
+
40
+ And update the configuration in your `.rubocop.yml` to include the bitcrowd rules:
41
+
42
+ ```yml
43
+ inherit_gem:
44
+ rubocop-bitcrowd:
45
+ - .rubocop.yml
46
+ - .rubocop-rspec.yml
47
+ - .rubocop-rails.yml
48
+ ```
49
+
50
+ As a new addition, `rubocop-bitcrowd` now also includes rules for the `rubocop-performance` gem. To use them, add the gem to your Gemfile:
51
+
52
+ ```ruby
53
+ gem 'rubocop-performance', require: false
54
+ ```
55
+
56
+ Then include the bitcrowd config in your `.rubocop.yml`:
57
+
58
+ ```yml
59
+ inherit_gem:
60
+ rubocop-bitcrowd:
61
+ - .rubocop.yml
62
+ - .rubocop-rspec.yml
63
+ - .rubocop-rails.yml
64
+ - .rubocop-performance.yml
65
+ ```
66
+
67
+ ### Potentially breaking changes:
68
+
69
+ * [#34](https://github.com/bitcrowd/rubocop-bitcrowd/pull/34) Extract `rails` cops into separate configuration based on [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails), following the modularization of `rubocop` itself.
70
+
71
+ ### New features:
72
+
73
+ * [#32](https://github.com/bitcrowd/rubocop-bitcrowd/pull/32) add possibility to include [rubocop-performance](https://github.com/rubocop-hq/rubocop-performance) cops.
74
+
27
75
  ## `2.1.3` (2020-03-26)
28
76
 
29
77
  https://github.com/bitcrowd/rubocop-bitcrowd/compare/v2.1.3...HEAD
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rubocop::Bitcrowd
1
+ # rubocop-bitcrowd 🚓
2
2
 
3
3
  The bitcrowd rubocop.yml as a gem.
4
4
 
@@ -7,8 +7,8 @@ The bitcrowd rubocop.yml as a gem.
7
7
  Add this lines to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'rubocop'
11
- gem 'rubocop-bitcrowd'
10
+ gem 'rubocop', require: false
11
+ gem 'rubocop-bitcrowd', require: false
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -17,7 +17,7 @@ And then execute:
17
17
 
18
18
  ## Usage
19
19
 
20
- To use the configuration in your project create a .rubocop.yml with:
20
+ To use the configuration in your project create a `.rubocop.yml` with:
21
21
 
22
22
  ```yml
23
23
  inherit_gem:
@@ -30,18 +30,30 @@ inherit_mode:
30
30
  - Exclude
31
31
  ```
32
32
 
33
- # Using rubocop-rspec
33
+ ### Using other rubocop gems
34
+
35
+ There are also config files for the other `rubocop` gems:
36
+ * [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails)
37
+ * [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec)
38
+ * [rubocop-performance](https://github.com/rubocop-hq/rubocop-performance)
39
+
40
+ To use any of them, add the respective gem to your Gemfile:
34
41
 
35
- There is also a config file for rubocop-rspec. To use it add rubocop-rspec to your Gemfile.
36
42
  ```ruby
37
- gem 'rubocop-rspec'
43
+ gem 'rubocop-rails', require: false
44
+ gem 'rubocop-rspec', require: false
45
+ gem 'rubocop-performance', require: false
38
46
  ```
39
47
 
48
+ Then include the bitcrowd config in your `.rubocop.yml`:
49
+
40
50
  ```yml
41
51
  inherit_gem:
42
52
  rubocop-bitcrowd:
43
53
  - .rubocop.yml
44
54
  - .rubocop-rspec.yml
55
+ - .rubocop-rails.yml
56
+ - .rubocop-performance.yml
45
57
 
46
58
  # Note: skip this if you want to override the default AllCops:Include and AllCops:Exclude list
47
59
  inherit_mode:
@@ -62,13 +74,13 @@ This gem provides a simple script, that can help you with this task:
62
74
  4. Run the script (may take a while, when you want to continue working on your project meanwhile run this in a separate checkout): `rubocop-autofix`
63
75
  5. Review all commits made by the script and run your tests. You can now drop certain commits of cops you don't want. Often it may make some sense to run the script again with changed settings, since rebasing 100+ commits is no fun.
64
76
 
65
- # Development
77
+ ## Development
66
78
 
67
79
  Any contributions are welcome. If you attempt to change the behavior of this gem it might be wise to open an issue first to discuss the change. Otherwise feel free to open a PR.
68
80
 
69
81
  Every PR should have a change in the [CHANGELOG](./CHANGELOG.md) file (within the [`master` section](./CHANGELOG.md#master)) briefly outlining the attempted changes.
70
82
 
71
- ## Release a new version
83
+ ### Release a new version
72
84
 
73
85
  To release a new version, follow these steps:
74
86
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'rubocop-bitcrowd'
3
- spec.version = '2.1.3'
3
+ spec.version = '2.2.0'
4
4
  spec.authors = ['bitcrowd']
5
5
  spec.email = ['info@bitcrowd.net']
6
6
 
@@ -12,16 +12,28 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.post_install_message = <<~HEREDOC
14
14
 
15
- This version of rubocop-bitcrowd no longer overrides RuboCop's AllCops:Exclude list.
16
- It only adds extra patterns not included in the defaults.
15
+ Starting with this version of rubocop-bitcrowd, we are following RuboCop's
16
+ modularization into separate gems and splitting up our configuration into:
17
+ - .rubocop.yml
18
+ - .rubocop-rails.yml
19
+ - .rubocop-rspec.yml
20
+ - .rubocop-performance.yml
17
21
 
18
- Therefore if you want to keep excluding both, the bitcrowd patterns as well as the RuboCop default ones,
19
- add this to your .rubocop.yml
20
- inherit_mode:
21
- merge:
22
- - Exclude
22
+ If you want to include the `rails`, `rspec` or `performance` cops, add the
23
+ respective gems to your Gemfile:
23
24
 
24
- For more details: https://rubocop.readthedocs.io/en/latest/configuration/#merging-arrays-using-inherit_mode
25
+ gem 'rubocop-rails', require: false
26
+ gem 'rubocop-rspec', require: false
27
+ gem 'rubocop-performance', require: false
28
+
29
+ Add include the bitcrowd specific configuration in your .rubocop.yml
30
+
31
+ inherit_gem:
32
+ rubocop-bitcrowd:
33
+ - .rubocop.yml
34
+ - .rubocop-rspec.yml
35
+ - .rubocop-rails.yml
36
+ - .rubocop-performance.yml
25
37
 
26
38
  Cheers!
27
39
  Your friends at bitcrowd
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-bitcrowd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bitcrowd
@@ -63,6 +63,8 @@ extra_rdoc_files: []
63
63
  files:
64
64
  - ".github/PULL_REQUEST_TEMPLATE.md"
65
65
  - ".gitignore"
66
+ - ".rubocop-performance.yml"
67
+ - ".rubocop-rails.yml"
66
68
  - ".rubocop-rspec.yml"
67
69
  - ".rubocop.yml"
68
70
  - CHANGELOG.md
@@ -79,16 +81,28 @@ metadata:
79
81
  changelog_uri: https://github.com/bitcrowd/rubocop-bitcrowd/blob/master/CHANGELOG.md
80
82
  post_install_message: |2+
81
83
 
82
- This version of rubocop-bitcrowd no longer overrides RuboCop's AllCops:Exclude list.
83
- It only adds extra patterns not included in the defaults.
84
+ Starting with this version of rubocop-bitcrowd, we are following RuboCop's
85
+ modularization into separate gems and splitting up our configuration into:
86
+ - .rubocop.yml
87
+ - .rubocop-rails.yml
88
+ - .rubocop-rspec.yml
89
+ - .rubocop-performance.yml
84
90
 
85
- Therefore if you want to keep excluding both, the bitcrowd patterns as well as the RuboCop default ones,
86
- add this to your .rubocop.yml
87
- inherit_mode:
88
- merge:
89
- - Exclude
91
+ If you want to include the `rails`, `rspec` or `performance` cops, add the
92
+ respective gems to your Gemfile:
90
93
 
91
- For more details: https://rubocop.readthedocs.io/en/latest/configuration/#merging-arrays-using-inherit_mode
94
+ gem 'rubocop-rails', require: false
95
+ gem 'rubocop-rspec', require: false
96
+ gem 'rubocop-performance', require: false
97
+
98
+ Add include the bitcrowd specific configuration in your .rubocop.yml
99
+
100
+ inherit_gem:
101
+ rubocop-bitcrowd:
102
+ - .rubocop.yml
103
+ - .rubocop-rspec.yml
104
+ - .rubocop-rails.yml
105
+ - .rubocop-performance.yml
92
106
 
93
107
  Cheers!
94
108
  Your friends at bitcrowd