makandra-rubocop 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +12 -5
- data/config/default.yml +1 -1
- data/lib/makandra_rubocop/support/rubocop_spec.rb +1 -1
- data/lib/makandra_rubocop/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9c46fcf110ed3214a90eb45a9009eda5c3427e108b716bcc9d062782aa4d249
|
4
|
+
data.tar.gz: fe74453161e63ad6157b97c1f901cae6e0c57e05f3de8ee638141348f09dbcff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 304928637b28a2a974abc6228fe1923d86027965f68d9441b5bc9b9ba2fc6fadaac5b7b0dfa76ddf937b7992bdf9865c255e0dc5a1b371d686a45dc5ba2bed7c
|
7
|
+
data.tar.gz: a5b4d6d1aaaf876eb3dc625a2bbac4fb56fdc872ca54bafb97a45408f5daa815c90ac78c4cfb2b7e7345fc5ea35a6a34cf30eb0af83f66bdc35a2a293b374d84
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,13 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
9
9
|
### Compatible changes
|
10
10
|
|
11
11
|
|
12
|
+
## 6.1.0 - 2021-04-30
|
13
|
+
|
14
|
+
### Compatible changes
|
15
|
+
|
16
|
+
- Disable `Style/AccessorGrouping`
|
17
|
+
|
18
|
+
|
12
19
|
## 6.0.0 - 2021-02-25
|
13
20
|
|
14
21
|
### Breaking changes
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@ It is currently very relaxed, and will evolve over time.
|
|
3
3
|
|
4
4
|
Note that we lock each version on a specific Rubocop version, as Rubocop's syntax changes regularly.
|
5
5
|
|
6
|
+
|
6
7
|
## Installation
|
7
8
|
|
8
9
|
Add this line to your application's Gemfile:
|
@@ -23,6 +24,7 @@ Or install it yourself as:
|
|
23
24
|
$ gem install makandra-rubocop
|
24
25
|
```
|
25
26
|
|
27
|
+
|
26
28
|
## Usage
|
27
29
|
|
28
30
|
Add a `.rubocop.yml` to your project with the following contents:
|
@@ -78,14 +80,12 @@ inherit_mode:
|
|
78
80
|
```
|
79
81
|
|
80
82
|
### Executing Rubocop on demand
|
81
|
-
|
82
83
|
Run Rubocop via `bundle exec rubocop` from your project directory.
|
83
84
|
|
84
85
|
For an initial run it might also useful to use the auto-correct option (`bundle exec rubocop --auto-correct`) and carefully check in all changes.
|
85
86
|
You can follow [this guide](https://makandracards.com/makandra/400093-adding-makandra-rubocop-to-an-existing-code-base) for bigger projects.
|
86
87
|
|
87
88
|
### Integrating Rubocop into your test suite
|
88
|
-
|
89
89
|
We recommend you add an RSpec test that runs rubocop automatically and confirms that there are no offenses.
|
90
90
|
This gem provides one. Simply add `spec/rubocop_spec.rb` to your project with the following code.
|
91
91
|
|
@@ -94,7 +94,6 @@ require 'makandra_rubocop/support/rubocop_spec'
|
|
94
94
|
```
|
95
95
|
|
96
96
|
### Configuring exceptions
|
97
|
-
|
98
97
|
Some of our defaults might not fit your project. You can disable specific cops or add exclusions to `.rubocop.yml` in such cases. You basically have two options:
|
99
98
|
|
100
99
|
- Disable cops for specific lines using [Ruby comments in your code](https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md#disabling-cops-within-source-code), like so:
|
@@ -116,14 +115,20 @@ See [Rubocop's configuration manual](https://github.com/rubocop-hq/rubocop/blob/
|
|
116
115
|
Note that disabling cops should be an exception for extremely rare cases where your code can not be aligned with Rubocop's requirements.
|
117
116
|
If our defaults don't match your opinion, you should discuss with the team.
|
118
117
|
|
118
|
+
|
119
119
|
## Development
|
120
120
|
|
121
121
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
122
122
|
|
123
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
123
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
124
124
|
|
125
|
-
|
125
|
+
When you're making changes, update the version number in `version.rb`:
|
126
|
+
- Increase the major version when you're upgrading the Rubocop dependency
|
127
|
+
- Increase the minor version e.g. when disabling a cop
|
128
|
+
|
129
|
+
For release run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
126
130
|
|
131
|
+
### Upgrading Rubocop version being used
|
127
132
|
1. Change `rubocop` dependency in gemspec to the release you want to upgrade to.
|
128
133
|
2. `bundle`
|
129
134
|
3. `git add remote rubocop https://github.com/rubocop-hq/rubocop.git`
|
@@ -135,12 +140,14 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
135
140
|
|
136
141
|
This procedure is the same for `rubocop-rails`.
|
137
142
|
|
143
|
+
|
138
144
|
## Contributing
|
139
145
|
|
140
146
|
Bug reports and pull requests are welcome on GitHub at https://github.com/makandra/makandra-rubocop.
|
141
147
|
|
142
148
|
If you make any changes to this gem's Ruby code, make sure to run `rubocop`.
|
143
149
|
|
150
|
+
|
144
151
|
## License
|
145
152
|
|
146
153
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/config/default.yml
CHANGED
@@ -2658,7 +2658,7 @@ Style/AccessModifierDeclarations:
|
|
2658
2658
|
|
2659
2659
|
Style/AccessorGrouping:
|
2660
2660
|
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
2661
|
-
Enabled:
|
2661
|
+
Enabled: false # Was voted against, see https://github.com/makandra/makandra-rubocop/issues/27
|
2662
2662
|
VersionAdded: '0.87'
|
2663
2663
|
EnforcedStyle: grouped
|
2664
2664
|
SupportedStyles:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makandra-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Hartherz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.1.4
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: makandra's default Rubocop configuration
|