mad_rubocop 4.1.0.rc1 → 4.2.0.pre1
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/.github/workflows/ci.yml +33 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/README.md +27 -4
- data/Rakefile +5 -0
- data/lib/disabled_cops.yml +1 -1
- data/lib/mad_rubocop/version.rb +1 -1
- data/mad_rubocop.gemspec +5 -4
- metadata +25 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 930cb2fd32ca469737626bc9a0887cc7bc360132a6f02fe64e7e1aea98385385
|
|
4
|
+
data.tar.gz: 6f128330fb5aec401bb769c396a96e649b33a4a131ca9b55111e83c66d24f019
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e28373a1d905f847cf3a621ea2531b91bd8f334cc3dbfd22844d8516d1148c8631635961ffb961661b0fb02ca844924c31562c7fa178a8e7255f0b590e679882
|
|
7
|
+
data.tar.gz: a6ac66cfa032a3ffa71bc401831895e0534fededd581278808101a532f387189629a13edf859303d64c06ced496e56e18be38ae8b1797603d386389240336d53
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
spec:
|
|
10
|
+
name: spec (${{ matrix.ruby }})
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
continue-on-error: ${{ matrix.experimental || false }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
ruby:
|
|
17
|
+
- "3.1"
|
|
18
|
+
- "3.4"
|
|
19
|
+
- "jruby-9.4"
|
|
20
|
+
- "jruby-10.0"
|
|
21
|
+
include:
|
|
22
|
+
# Bleeding-edge runtime: exercised, but allowed to fail so a
|
|
23
|
+
# not-yet-released or in-flight toolchain never blocks a PR.
|
|
24
|
+
- ruby: "4.0"
|
|
25
|
+
experimental: true
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: ruby/setup-ruby@v1
|
|
29
|
+
with:
|
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
|
31
|
+
bundler-cache: true
|
|
32
|
+
- name: Run specs
|
|
33
|
+
run: bundle exec rake spec
|
data/.rspec
ADDED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.8
|
data/README.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
[](https://gemnasium.com/mxenabled/mad_rubocop)
|
|
2
|
-
|
|
3
1
|
# MadRubocop
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
[](https://github.com/mxenabled/mad_rubocop/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
Custom RuboCop yml files to modify the cops enforced by RuboCop, shared across projects.
|
|
6
|
+
|
|
7
|
+
Built on RuboCop `~> 1.88`, rubocop-rails `~> 2.35`, and rubocop-performance `~> 1.26`. Requires Ruby `>= 3.1`.
|
|
8
|
+
|
|
9
|
+
## What's in the box
|
|
10
|
+
|
|
11
|
+
This gem ships configuration only — no Ruby code. Consumers inherit three files:
|
|
12
|
+
|
|
13
|
+
- `.rubocop.yml` — the entry point. Loads the `rubocop-rails` and `rubocop-performance` plugins, inherits the two files below, and sets `AllCops` defaults (`NewCops: disable`, so cops added in a RuboCop upgrade stay off until explicitly enabled here).
|
|
14
|
+
- `lib/disabled_cops.yml` — cops turned off, either as permanent house style or because the codebase isn't ready for them.
|
|
15
|
+
- `lib/modified_cops.yml` — cops kept on but configured to a non-default style (e.g. `hash_rockets`, `double_quotes`, outdented access modifiers).
|
|
6
16
|
|
|
7
17
|
## Installation
|
|
8
18
|
|
|
@@ -27,15 +37,28 @@ inherit_gem:
|
|
|
27
37
|
mad_rubocop: .rubocop.yml
|
|
28
38
|
```
|
|
29
39
|
|
|
30
|
-
NOTE: The `
|
|
40
|
+
NOTE: The `Exclude` setting on cops that only ignore certain files or directories cannot be set by MadRubocop.
|
|
31
41
|
|
|
32
42
|
|
|
33
43
|
## Development
|
|
34
44
|
|
|
35
45
|
After checking out the repo, run `bin/setup` to install dependencies.
|
|
36
46
|
|
|
47
|
+
Run the test suite with `bundle exec rake spec`. The specs validate the shipped configuration against the installed RuboCop — they confirm the config loads, the rubocop-rails and rubocop-performance plugins are present, and every referenced cop still exists (catching cops that a RuboCop upgrade renames or removes).
|
|
48
|
+
|
|
37
49
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then 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).
|
|
38
50
|
|
|
51
|
+
### Upgrading RuboCop
|
|
52
|
+
|
|
53
|
+
Keeping the pinned RuboCop (and its plugins) current is the main maintenance task. The workflow:
|
|
54
|
+
|
|
55
|
+
1. Bump the version constraints for `rubocop`, `rubocop-rails`, and/or `rubocop-performance` in `mad_rubocop.gemspec`.
|
|
56
|
+
2. Run `bundle update rubocop rubocop-rails rubocop-performance`.
|
|
57
|
+
3. Run `bundle exec rake spec`. The suite fails if the config references a cop that the new RuboCop **renamed or removed** — the failure message names the offending cop.
|
|
58
|
+
4. For each failure, update the cop name in `lib/disabled_cops.yml` / `lib/modified_cops.yml` (or drop it if the cop no longer exists).
|
|
59
|
+
5. Because `NewCops` is disabled, cops **added** in the upgrade are off by default. Review `rubocop --show-cops` (or the release notes) and add any you want to disable/configure.
|
|
60
|
+
6. Bump `MadRubocop::VERSION` in `version.rb`, note the change, and release.
|
|
61
|
+
|
|
39
62
|
## Contributing
|
|
40
63
|
|
|
41
64
|
Bug reports and pull requests are welcome on GitHub at https://github.com/mxenabled/mad_rubocop.
|
data/Rakefile
CHANGED
data/lib/disabled_cops.yml
CHANGED
data/lib/mad_rubocop/version.rb
CHANGED
data/mad_rubocop.gemspec
CHANGED
|
@@ -20,11 +20,12 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
21
21
|
spec.require_paths = ["lib"]
|
|
22
22
|
|
|
23
|
-
spec.required_ruby_version =
|
|
23
|
+
spec.required_ruby_version = ">= 3.1"
|
|
24
24
|
|
|
25
|
-
spec.add_dependency "rubocop", "~> 1.
|
|
26
|
-
spec.add_dependency "rubocop-performance", "~> 1.
|
|
27
|
-
spec.add_dependency "rubocop-rails", "~> 2.
|
|
25
|
+
spec.add_dependency "rubocop", "~> 1.88.0"
|
|
26
|
+
spec.add_dependency "rubocop-performance", "~> 1.26.1"
|
|
27
|
+
spec.add_dependency "rubocop-rails", "~> 2.35.5"
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 2.0"
|
|
29
29
|
spec.add_development_dependency "rake"
|
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
|
30
31
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mad_rubocop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.2.0.pre1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Toolson
|
|
@@ -15,42 +15,42 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 1.88.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
25
|
+
version: 1.88.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rubocop-performance
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: 1.26.1
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
39
|
+
version: 1.26.1
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: rubocop-rails
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
46
|
+
version: 2.35.5
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
53
|
+
version: 2.35.5
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: bundler
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -79,6 +79,20 @@ dependencies:
|
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: '0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: rspec
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '3.0'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '3.0'
|
|
82
96
|
description: Wrapper for MX specific RuboCop settings for managing custom settings
|
|
83
97
|
across many projects.
|
|
84
98
|
email:
|
|
@@ -88,7 +102,9 @@ executables:
|
|
|
88
102
|
extensions: []
|
|
89
103
|
extra_rdoc_files: []
|
|
90
104
|
files:
|
|
105
|
+
- ".github/workflows/ci.yml"
|
|
91
106
|
- ".gitignore"
|
|
107
|
+
- ".rspec"
|
|
92
108
|
- ".rubocop.yml"
|
|
93
109
|
- ".ruby-version"
|
|
94
110
|
- Gemfile
|
|
@@ -112,14 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
112
128
|
requirements:
|
|
113
129
|
- - ">="
|
|
114
130
|
- !ruby/object:Gem::Version
|
|
115
|
-
version:
|
|
131
|
+
version: '3.1'
|
|
116
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
133
|
requirements:
|
|
118
134
|
- - ">="
|
|
119
135
|
- !ruby/object:Gem::Version
|
|
120
136
|
version: '0'
|
|
121
137
|
requirements: []
|
|
122
|
-
rubygems_version: 3.6.
|
|
138
|
+
rubygems_version: 3.6.9
|
|
123
139
|
specification_version: 4
|
|
124
140
|
summary: Wrapper for MX specific RuboCop settings. https://twitter.com/madrubocop
|
|
125
141
|
test_files: []
|