rubocop-ruby3_1 1.1.4 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +41 -4
- data/CONTRIBUTING.md +11 -10
- data/LICENSE.txt +1 -1
- data/README.md +220 -151
- data/SECURITY.md +2 -1
- data/lib/rubocop/ruby3_1/railtie.rb +14 -0
- data/lib/rubocop/ruby3_1/rakelib/rubocop_gradual.rake +11 -0
- data/lib/rubocop/ruby3_1/tasks.rake +4 -0
- data/lib/rubocop/ruby3_1/version.rb +3 -1
- data/lib/rubocop/ruby3_1.rb +14 -0
- data/rubocop-lts/rails.yml +11 -0
- data/rubocop-lts/rails_rspec.yml +6 -0
- data/rubocop-lts/rspec.yml +9 -0
- data/rubocop-lts/ruby.yml +43 -0
- data/rubocop-lts/ruby_rspec.yml +6 -0
- data/rubocop-lts/rubygem.yml +6 -0
- data/rubocop-lts/rubygem_rspec.yml +4 -0
- data/rubocop-lts/strict/rails.yml +22 -0
- data/rubocop-lts/strict/rspec.yml +14 -0
- data/rubocop-lts/strict/ruby.yml +14 -0
- data/rubocop.yml +15 -3
- data/sig/rubocop/ruby3_1.rbs +4 -2
- data.tar.gz.sig +0 -0
- metadata +146 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a3b254df6c980f3bc5a8bfb55b4d388479f09802d4c6a849beffd337263dba8
|
4
|
+
data.tar.gz: f450fd2fba41ef1c4a99212ef82e05dc38d1fb765d702d7104b2b6b6b2872650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97536d7cfb454a75da8455ec68fb025929faa356fb23c7729954c88811f08554959fbb0e47f3c23f76a3e511b9765251f070a9a9ef50972b9f65c65c63814d8f
|
7
|
+
data.tar.gz: 63b50e73de8ace35cebc4674357c630c1fea11ebd18ad41b9c2f651f47278bed246f8f589bf16fb046845bb4ad15ee960cfeb36710a18a6a7e4bd81877048b56
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
10
10
|
### Fixed
|
11
11
|
### Removed
|
12
12
|
|
13
|
+
## [2.0.3] 2023-05-21
|
14
|
+
### Fixed
|
15
|
+
- Ship rake tasks in gem package
|
16
|
+
|
17
|
+
## [2.0.2] 2023-05-19
|
18
|
+
### Fixed
|
19
|
+
- Fix rake_tasks hook on Railtie
|
20
|
+
|
21
|
+
## [2.0.1] 2023-05-17 [YANKED]
|
22
|
+
### Added
|
23
|
+
- Configs added for:
|
24
|
+
- standard-performance
|
25
|
+
- standard-custom
|
26
|
+
- standard-rubocop-lts
|
27
|
+
- And optionally, if you are building a Rails app:
|
28
|
+
- betterlint
|
29
|
+
- standard-rails
|
30
|
+
- version_gem
|
31
|
+
|
32
|
+
## [2.0.0] 2023-05-09 [YANKED]
|
33
|
+
### Changed
|
34
|
+
- New/Better configs for:
|
35
|
+
- rubocop
|
36
|
+
- rubocop-gradual
|
37
|
+
- rubocop-md
|
38
|
+
- rubocop-performance
|
39
|
+
- rubocop-rake
|
40
|
+
- rubocop-shopify
|
41
|
+
- rubocop-thread_safety
|
42
|
+
- standard
|
43
|
+
- And optionally, if you are using RSpec:
|
44
|
+
- rubocop-rspec
|
45
|
+
- And optionally, if you are using building a RubyGem:
|
46
|
+
- rubocop-packaging
|
47
|
+
|
13
48
|
## [1.1.4] 2022-12-20
|
14
49
|
### Fixed
|
15
50
|
* Do not require version.rb from gemspec so code coverage is accurate from both `rake` and `rspec`
|
@@ -21,9 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
21
56
|
### Added
|
22
57
|
* Linting to fix CI build
|
23
58
|
* Improved Rakefile for YARD docs
|
24
|
-
* Documentation of
|
25
|
-
* `rubocop-ruby2_7` (this gem) will install a version of `rubocop` which will
|
26
|
-
**install** on (1), **run** on (2), and **analyze code** (3) intended to support any version of Ruby >= 2.7.
|
59
|
+
* Documentation of why this gem exists
|
27
60
|
|
28
61
|
## [1.1.2] 2022-12-18
|
29
62
|
### Added
|
@@ -73,7 +106,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
73
106
|
### Added
|
74
107
|
* Initial release
|
75
108
|
|
76
|
-
[Unreleased]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/
|
109
|
+
[Unreleased]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v2.0.3...HEAD
|
110
|
+
[2.0.3]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v2.0.2...v2.0.3
|
111
|
+
[2.0.2]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v2.0.1...v2.0.2
|
112
|
+
[2.0.1]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v2.0.0...v2.0.1
|
113
|
+
[2.0.0]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v1.1.4...v2.0.0
|
77
114
|
[1.1.4]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v1.1.3...v1.1.4
|
78
115
|
[1.1.3]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v1.1.2...v1.1.3
|
79
116
|
[1.1.2]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/compare/v1.1.1...v1.1.2
|
data/CONTRIBUTING.md
CHANGED
@@ -11,13 +11,15 @@ and post a message to the [gitter chat][🏘chat].
|
|
11
11
|
|
12
12
|
To release a new version:
|
13
13
|
|
14
|
-
1.
|
15
|
-
2.
|
16
|
-
3.
|
17
|
-
4. run `
|
18
|
-
5. move the built gem
|
19
|
-
6.
|
20
|
-
7.
|
14
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check.
|
15
|
+
2. update the version number in `version.rb`
|
16
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`.
|
17
|
+
4. run `bundle exec rake build:checksum`
|
18
|
+
5. move the built gem to project root
|
19
|
+
6. run `bin/checksum` to create the missing SHA256 checksum
|
20
|
+
7. move the built gem back to `pkg/`
|
21
|
+
8. commit the changes
|
22
|
+
9. 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][rubygems].
|
21
23
|
|
22
24
|
NOTE: You will need to have a public key in `certs/`, and list your cert in the
|
23
25
|
`gemspec`, in order to sign the new release.
|
@@ -25,13 +27,12 @@ See: [RubyGems Security Guide][rubygems-security-guide]
|
|
25
27
|
|
26
28
|
## Contributors
|
27
29
|
|
28
|
-
[
|
30
|
+
See: [https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/graphs/main][🖐contributors]
|
29
31
|
|
30
32
|
[comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
|
31
33
|
|
32
|
-
[conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/CODE_OF_CONDUCT.md
|
34
|
+
[🤝conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/CODE_OF_CONDUCT.md
|
33
35
|
[🖐contributors]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/graphs/main
|
34
|
-
[🖐contributors-img]: https://img.shields.io/github/contributors-anon/rubocop-lts/rubocop-ruby3_1
|
35
36
|
[🚎src-main]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/tree/main
|
36
37
|
[🏘chat]: https://gitter.im/rubocop-lts/community
|
37
38
|
[rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2022 Peter Boling
|
3
|
+
Copyright (c) 2022 - 2023 Peter H. Boling of https://railsbling.com
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
<p align="center">
|
2
2
|
<a href="https://rubocop.org#gh-light-mode-only" target="_blank" rel="noopener">
|
3
|
-
<img height="120px" src="https://
|
3
|
+
<img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/logo/rubocop-light.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
|
4
4
|
</a>
|
5
5
|
<a href="https://rubocop.org#gh-dark-mode-only" target="_blank" rel="noopener">
|
6
|
-
<img height="120px" src="https://
|
6
|
+
<img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/logo/rubocop-dark.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
|
7
7
|
</a>
|
8
8
|
<a href="https://www.ruby-lang.org/" target="_blank" rel="noopener">
|
9
|
-
<img height="120px" src="https://
|
9
|
+
<img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5, see docs/images/logo/README.txt">
|
10
10
|
</a>
|
11
11
|
<a href="https://semver.org/#gh-light-mode-only" target="_blank" rel="noopener">
|
12
|
-
<img height="120px" src="https://
|
12
|
+
<img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
|
13
13
|
</a>
|
14
14
|
<a href="https://semver.org/#gh-dark-mode-only" target="_blank" rel="noopener">
|
15
|
-
<img height="120px" src="https://
|
15
|
+
<img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
|
16
16
|
</a>
|
17
17
|
</p>
|
18
18
|
|
19
19
|
---
|
20
20
|
|
21
|
-
NOTE: You might be interested in [`rubocop-lts`]
|
21
|
+
NOTE: You might be interested in [`rubocop-lts`][rlts] which sits as a higher level than this gem, and can keep pace with whatever version of Ruby you happen to be on.
|
22
22
|
|
23
|
-
| Gem Name
|
24
|
-
|
25
|
-
| [`rubocop-lts`][⛳️lts-gh]
|
26
|
-
| [`rubocop-ruby3_1`][⛳️
|
23
|
+
| Gem Name | Version | Downloads | CI | Activity |
|
24
|
+
|-------------------------------|-------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
|
25
|
+
| [`rubocop-lts`][⛳️lts-gh] | [![Gem Version][⛳️lts-vi]][⛳️lts-g] | [![Total DL][🖇️lts-dti]][⛳️lts-g] [![DL Rank][🏘️lts-rti]][⛳️lts-g] | [![Current][🚎lts-cwfi]][🚎lts-cwf] | [![Open Issues][📗lts-ioi]][📗lts-io] [![Closed Issues][🚀lts-ici]][🚀lts-ic] [![Open PRs][💄lts-poi]][💄lts-po] [![Closed PRs][👽lts-pci]][👽lts-pc] |
|
26
|
+
| [`rubocop-ruby3_1`][⛳️ini-gh] | [![Gem Version][⛳️ini-vi]][⛳️ini-g] | [![Total DL][🖇️ini-dti]][⛳️ini-g] [![DL Rank][🏘️ini-rti]][⛳️ini-g] | [![Current][🚎ini-cwfi]][🚎ini-cwf] [![Heads][🖐ini-hwfi]][🖐ini-hwf] | [![Open Issues][📗ini-ioi]][📗ini-io] [![Closed Issues][🚀ini-ici]][🚀ini-ic] [![Open PRs][💄ini-poi]][💄ini-po] [![Closed PRs][👽ini-pci]][👽ini-pc] |
|
27
27
|
|
28
28
|
<!-- columnar badge #s for Project Health table:
|
29
29
|
⛳️
|
@@ -41,91 +41,141 @@ NOTE: You might be interested in [`rubocop-lts`](https://gitlab.com/rubocop-lts/
|
|
41
41
|
[⛳️lts-vi]: http://img.shields.io/gem/v/rubocop-lts.svg
|
42
42
|
[🖇️lts-dti]: https://img.shields.io/gem/dt/rubocop-lts.svg
|
43
43
|
[🏘️lts-rti]: https://img.shields.io/gem/rt/rubocop-lts.svg
|
44
|
-
[🚎lts-cwf]: https://
|
45
|
-
[🚎lts-cwfi]: https://
|
46
|
-
[🖐lts-hwf]: https://
|
47
|
-
[🖐lts-hwfi]: https://
|
48
|
-
[🧮lts-lwf]: https://
|
49
|
-
[🧮lts-lwfi]: https://
|
50
|
-
[📗lts-io]: https://
|
44
|
+
[🚎lts-cwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml
|
45
|
+
[🚎lts-cwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml/badge.svg
|
46
|
+
[🖐lts-hwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml
|
47
|
+
[🖐lts-hwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml/badge.svg
|
48
|
+
[🧮lts-lwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/legacy.yml
|
49
|
+
[🧮lts-lwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/legacy.yml/badge.svg
|
50
|
+
[📗lts-io]: https://github.com/rubocop-lts/rubocop-lts/issues
|
51
51
|
[📗lts-ioi]: https://img.shields.io/github/issues-raw/rubocop-lts/rubocop-lts
|
52
|
-
[🚀lts-ic]: https://
|
52
|
+
[🚀lts-ic]: https://github.com/rubocop-lts/rubocop-lts/issues?q=is%3Aissue+is%3Aclosed
|
53
53
|
[🚀lts-ici]: https://img.shields.io/github/issues-closed-raw/rubocop-lts/rubocop-lts
|
54
|
-
[💄lts-po]: https://
|
54
|
+
[💄lts-po]: https://github.com/rubocop-lts/rubocop-lts/pulls
|
55
55
|
[💄lts-poi]: https://img.shields.io/github/issues-pr/rubocop-lts/rubocop-lts
|
56
|
-
[👽lts-pc]: https://
|
56
|
+
[👽lts-pc]: https://github.com/rubocop-lts/rubocop-lts/pulls?q=is%3Apr+is%3Aclosed
|
57
57
|
[👽lts-pci]: https://img.shields.io/github/issues-pr-closed/rubocop-lts/rubocop-lts
|
58
58
|
[⛳️lts-g]: https://rubygems.org/gems/rubocop-lts
|
59
|
-
[⛳️lts-gh]: https://
|
60
|
-
|
61
|
-
[⛳️
|
62
|
-
[🖇️
|
63
|
-
[🏘️
|
64
|
-
[🚎
|
65
|
-
[🚎
|
66
|
-
[🖐
|
67
|
-
[🖐
|
68
|
-
[🧮
|
69
|
-
[🧮
|
70
|
-
[📗
|
71
|
-
[📗
|
72
|
-
[🚀
|
73
|
-
[🚀
|
74
|
-
[💄
|
75
|
-
[💄
|
76
|
-
[👽
|
77
|
-
[👽
|
78
|
-
[⛳️
|
79
|
-
[⛳️
|
80
|
-
|
81
|
-
# Rubocop::Ruby31
|
59
|
+
[⛳️lts-gh]: https://github.com/rubocop-lts/rubocop-lts
|
60
|
+
|
61
|
+
[⛳️ini-vi]: http://img.shields.io/gem/v/rubocop-ruby3_1.svg
|
62
|
+
[🖇️ini-dti]: https://img.shields.io/gem/dt/rubocop-ruby3_1.svg
|
63
|
+
[🏘️ini-rti]: https://img.shields.io/gem/rt/rubocop-ruby3_1.svg
|
64
|
+
[🚎ini-cwf]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/current.yml
|
65
|
+
[🚎ini-cwfi]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/current.yml/badge.svg
|
66
|
+
[🖐ini-hwf]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/heads.yml
|
67
|
+
[🖐ini-hwfi]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/heads.yml/badge.svg
|
68
|
+
[🧮ini-lwf]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/legacy.yml
|
69
|
+
[🧮ini-lwfi]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions/workflows/legacy.yml/badge.svg
|
70
|
+
[📗ini-io]: https://github.com/rubocop-lts/rubocop-ruby3_1/issues
|
71
|
+
[📗ini-ioi]: https://img.shields.io/github/issues-raw/rubocop-lts/rubocop-ruby3_1
|
72
|
+
[🚀ini-ic]: https://github.com/rubocop-lts/rubocop-ruby3_1/issues?q=is%3Aissue+is%3Aclosed
|
73
|
+
[🚀ini-ici]: https://img.shields.io/github/issues-closed-raw/rubocop-lts/rubocop-ruby3_1
|
74
|
+
[💄ini-po]: https://github.com/rubocop-lts/rubocop-ruby3_1/pulls
|
75
|
+
[💄ini-poi]: https://img.shields.io/github/issues-pr/rubocop-lts/rubocop-ruby3_1
|
76
|
+
[👽ini-pc]: https://github.com/rubocop-lts/rubocop-ruby3_1/pulls?q=is%3Apr+is%3Aclosed
|
77
|
+
[👽ini-pci]: https://img.shields.io/github/issues-pr-closed/rubocop-lts/rubocop-ruby3_1
|
78
|
+
[⛳️ini-g]: https://rubygems.org/gems/rubocop-ruby3_1
|
79
|
+
[⛳️ini-gh]: https://github.com/rubocop-lts/rubocop-ruby3_1
|
80
|
+
|
81
|
+
# 🦾 Rubocop::Ruby31
|
82
82
|
|
83
83
|
See the intro [blog post](https://dev.to/pboling/rubocop-ruby-matrix-gems-nj)!
|
84
84
|
|
85
|
-
This gem
|
85
|
+
This gem configures many gems for you:
|
86
|
+
|
87
|
+
- rubocop
|
88
|
+
- rubocop-gradual
|
89
|
+
- rubocop-md
|
90
|
+
- rubocop-rake
|
91
|
+
- rubocop-shopify
|
92
|
+
- rubocop-thread_safety
|
93
|
+
- standard
|
94
|
+
- standard-performance (incl. rubocop-performance)
|
95
|
+
- standard-custom
|
96
|
+
- standard-rubocop-lts (ruby version-specific rules)
|
97
|
+
|
98
|
+
And optionally, if you are using RSpec:
|
99
|
+
|
100
|
+
- rubocop-rspec
|
101
|
+
|
102
|
+
And optionally, if you are building a RubyGem:
|
103
|
+
|
104
|
+
- rubocop-packaging
|
105
|
+
|
106
|
+
And optionally, if you are building a Rails app:
|
107
|
+
|
108
|
+
- standard-rails (incl. rubocop-rails)
|
109
|
+
- betterlint
|
86
110
|
|
87
111
|
Awareness of `rubocop`'s lack of [SemVer][semver] adherence isn't evenly dispersed in the Ruby community.
|
88
112
|
|
89
|
-
The RuboCop team [has
|
90
|
-
for [not following SemVer](https://github.com/rubocop/rubocop/issues/4243)
|
91
|
-
|
92
|
-
|
113
|
+
The RuboCop team [has reasons](https://github.com/semver/semver/issues/317)
|
114
|
+
for [not following SemVer](https://github.com/rubocop/rubocop/issues/4243).
|
115
|
+
|
116
|
+
NOTE: They think they are following SemVer,
|
117
|
+
but their interpretation differs from mine, and seems to differ from the
|
118
|
+
[intent of SemVer's creator][major-versions-not-sacred].
|
93
119
|
|
94
120
|
<p align="left">
|
95
121
|
<a href="https://metaredux.com/posts/2022/04/21/rubocop-turns-10.html" target="_blank" rel="noopener">
|
96
|
-
<img width="360px" src="https://
|
122
|
+
<img width="360px" src="https://github.com/rubocop-lts/rubocop-ruby3_1/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
|
97
123
|
</a>
|
98
124
|
</p>
|
99
125
|
|
100
126
|
The purpose of this gem is to constrain the `rubocop` dependency of a project in
|
101
|
-
a [SemVer compliant]
|
102
|
-
|
127
|
+
a [SemVer compliant][semver]
|
128
|
+
(Semantic Versioning, [Major Versions are Not Sacred][major-versions-not-sacred])
|
129
|
+
way that aligns with its desired minimum compatible/supported Ruby version.
|
130
|
+
Secondary purpose is to provide default configurations for a bevy of RuboCop-related plugins.
|
131
|
+
|
132
|
+
## 💎 Ruby Version Support
|
103
133
|
|
104
|
-
|
134
|
+
This gem facilitates equivalent of adding a `~> ` version constrained `rubocop`(-ish +more) dependency,
|
135
|
+
thus minimizing the risk of a rubocop minor / patch upgrade breaking the build.
|
105
136
|
|
106
|
-
|
107
|
-
minimizing the risk of a rubocop minor / patch upgrade breaking the build. See the
|
108
|
-
official [compatibility matrix][rubocop-matrix] for `rubocop`.
|
137
|
+
### What's that you say?
|
109
138
|
|
110
|
-
|
139
|
+
This gem will install a suite of tools that will **analyze & lint code** intended to support any version of Ruby >= 2.0.
|
111
140
|
|
112
|
-
|
113
|
-
|
141
|
+
This gem helps insulate projects from RuboCop churn by enshrining many conventions
|
142
|
+
that have been shown over years to reduce problems.
|
114
143
|
|
115
|
-
|
116
|
-
|
144
|
+
#### Background
|
145
|
+
|
146
|
+
Each [spring `rubocop` drops][rubocop-support-matrix] the ability to **install** and **run** `rubocop` on an EOL'd Ruby.
|
117
147
|
Eventually `rubocop` will drop the ability to **analyze code** intended to support an EOL'd Ruby,
|
118
|
-
as they already have for Ruby 1.
|
119
|
-
|
120
|
-
|
148
|
+
as they already have for Ruby 1.9. RuboCop has never run properly on Ruby 1.8.
|
149
|
+
This gem, via [standard (Standard Ruby)][standardrb], allows RuboCop to analyze Ruby 3.1 code,
|
150
|
+
by turning off certain rules that only apply to later Rubies.
|
151
|
+
|
152
|
+
When the `rubocop` team makes _any_ of these changes they
|
153
|
+
[only bump the minor version][rubocop-versioning] of RuboCop,
|
154
|
+
in violation of SemVer ([they disagree][rubocop-release-policy]).
|
155
|
+
|
156
|
+
In other words, RuboCop intentionally does not bump the major version when they drop
|
157
|
+
_analysis_, _runtime_, or _installation_ support for a given version of Ruby.
|
158
|
+
|
159
|
+
This is a primary _raison d’être_ for this project.
|
160
|
+
To get a better understanding of how SemVer is intended to work read this article from the creator of SemVer:
|
161
|
+
|
162
|
+
- ["Major Version Numbers are Not Sacred"][major-versions-not-sacred]!
|
121
163
|
|
122
|
-
|
164
|
+
[rubocop-support-matrix]: https://docs.rubocop.org/rubocop/compatibility.html#support-matrix
|
165
|
+
[rubocop-versioning]: https://docs.rubocop.org/rubocop/versioning.html
|
166
|
+
[rubocop-release-policy]: https://docs.rubocop.org/rubocop/versioning.html#release-policy
|
167
|
+
[major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
168
|
+
[standardrb]: https://github.com/standardrb/standard
|
123
169
|
|
124
|
-
|
170
|
+
### 👪 A Gem Family
|
171
|
+
|
172
|
+
The `rubocop-lts` family of gems has a version supporting any version of Ruby you need.
|
125
173
|
They can be used as development dependencies for libraries or applications.
|
126
174
|
|
175
|
+
- [`rubocop-lts`][rlts]
|
176
|
+
- [`standard-rubocop-lts`][stdrlts]
|
177
|
+
- [`rubocop-ruby1_8`][rr18]
|
127
178
|
- [`rubocop-ruby1_9`][rr19]
|
128
|
-
- [Still supporting Ruby 1.8?][what1_8]
|
129
179
|
- [`rubocop-ruby2_0`][rr20]
|
130
180
|
- [`rubocop-ruby2_1`][rr21]
|
131
181
|
- [`rubocop-ruby2_2`][rr22]
|
@@ -136,7 +186,11 @@ They can be used as development dependencies for libraries or applications.
|
|
136
186
|
- [`rubocop-ruby2_7`][rr27]
|
137
187
|
- [`rubocop-ruby3_0`][rr30]
|
138
188
|
- [`rubocop-ruby3_1`][rr31]
|
189
|
+
- [`rubocop-ruby3_2`][rr32]
|
139
190
|
|
191
|
+
[rlts]: https://github.com/rubocop-lts/rubocop-lts#-how-to-untie-gorgons-knot
|
192
|
+
[stdrlts]: https://github.com/rubocop-lts/standard-rubocop-lts
|
193
|
+
[rr18]: https://gitlab.com/rubocop-lts/standard-rubocop-lts
|
140
194
|
[rr19]: https://gitlab.com/rubocop-lts/rubocop-ruby1_9
|
141
195
|
[rr20]: https://gitlab.com/rubocop-lts/rubocop-ruby2_0
|
142
196
|
[rr21]: https://gitlab.com/rubocop-lts/rubocop-ruby2_1
|
@@ -148,13 +202,13 @@ They can be used as development dependencies for libraries or applications.
|
|
148
202
|
[rr27]: https://gitlab.com/rubocop-lts/rubocop-ruby2_7
|
149
203
|
[rr30]: https://gitlab.com/rubocop-lts/rubocop-ruby3_0
|
150
204
|
[rr31]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1
|
151
|
-
[
|
152
|
-
[rubocop-matrix]: https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/compatibility.adoc#support-matrix
|
205
|
+
[rr32]: https://gitlab.com/rubocop-lts/rubocop-ruby3_2
|
153
206
|
|
154
207
|
## 🗿 Stable
|
155
208
|
|
156
209
|
All releases of this gem are stable releases.
|
157
|
-
We do not release new versions for every release of `rubocop
|
210
|
+
We do not release new versions for every release of `rubocop`,
|
211
|
+
as this gem is tied to [standard (Standard Ruby)][standardrb].
|
158
212
|
A typical release cycle for a gem in the `rubocop-lts` family is roughly every six months,
|
159
213
|
though eventually analysis support for an old version of Ruby will be dropped.
|
160
214
|
When that happens releases of the `rubocop-lts` gem for that version of Ruby will (mostly) cease.
|
@@ -169,43 +223,89 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
169
223
|
|
170
224
|
$ gem install rubocop-ruby3_1
|
171
225
|
|
172
|
-
## 🔧 Usage
|
173
|
-
|
174
|
-
The following is optional. We'll discuss why you might want to do this after you see what it does.
|
226
|
+
## 🔧 Basic Usage
|
175
227
|
|
176
|
-
|
228
|
+
If you are using Rails, building a Rubygem, or not using RSpec, see ["Advanced Usage"](#advanced-usage).
|
229
|
+
Otherwise, if you using this in plain Ruby _and_ RSpec, you can add to the top of your project's `.rubocop.yml` configuration file:
|
177
230
|
|
178
231
|
```yaml
|
179
232
|
inherit_gem:
|
180
233
|
rubocop-ruby3_1: rubocop.yml
|
181
234
|
```
|
182
235
|
|
183
|
-
|
236
|
+
Among _many_ other settings, this has the effect of declaring the following:
|
184
237
|
|
185
238
|
```yaml
|
186
239
|
AllCops:
|
187
|
-
# remove if already present in your `.rubocop.yml` to gain the full benefit of this gem!
|
188
|
-
TargetRubyVersion: 3.1
|
189
240
|
NewCops: enable
|
190
241
|
```
|
191
242
|
|
192
|
-
Let's talk about these settings.
|
243
|
+
Let's talk about these settings. (TODO: Document some of the other settings!)
|
193
244
|
|
194
|
-
###
|
245
|
+
### ⚙️ `NewCops: enable`
|
195
246
|
|
196
|
-
|
247
|
+
Upgrades to the latest RuboCop can include all kinds of changes, including removing support for the version of Ruby your project uses, or adding a cop that may not work with some of your syntax (e.g. [some use cases of 'module_function`](https://github.com/rubocop/rubocop/issues/5953#issuecomment-805921993)). Accepting new cops arriving in a new version of RuboCop can feel risky, especially when it doesn't follow SemVer.
|
197
248
|
|
198
|
-
|
249
|
+
But this gem shoehorns RuboCop into SemVer, under the watchful eye of [standard (Standard Ruby)][standardrb]... so `NewCops` is now safe(r)! If you use a dependency greening tool like GitHub's `dependabot`, or the excellent alternatives [depfu](https://depfu.com/), and [`renovate`](https://www.whitesourcesoftware.com/free-developer-tools/renovate/), then you can see the effect of a minor / major version bump in your CI Build!
|
199
250
|
|
200
|
-
|
251
|
+
## Advanced Usage
|
201
252
|
|
202
|
-
|
253
|
+
### Linting Ruby + RSpec
|
203
254
|
|
204
|
-
|
255
|
+
```yaml
|
256
|
+
inherit_gem:
|
257
|
+
rubocop-ruby3_1: rubocop-lts/ruby_rspec.yml
|
258
|
+
# Note: technically the above is the same as the "Basic Usage" below, so if specificity is not your jam:
|
259
|
+
# rubocop-ruby3_1: rubocop.yml
|
260
|
+
```
|
205
261
|
|
206
|
-
|
262
|
+
### Linting Ruby w/o RSpec
|
207
263
|
|
208
|
-
|
264
|
+
```yaml
|
265
|
+
inherit_gem:
|
266
|
+
rubocop-ruby3_1: rubocop-lts/ruby.yml
|
267
|
+
```
|
268
|
+
|
269
|
+
### Linting Rails + RSpec
|
270
|
+
|
271
|
+
```yaml
|
272
|
+
inherit_gem:
|
273
|
+
rubocop-ruby3_1: rubocop-lts/rails_rspec.yml
|
274
|
+
```
|
275
|
+
|
276
|
+
#### Linting Rails w/o RSpec
|
277
|
+
|
278
|
+
```yaml
|
279
|
+
inherit_gem:
|
280
|
+
rubocop-ruby3_1: rubocop-lts/rails.yml
|
281
|
+
```
|
282
|
+
|
283
|
+
#### Linting a RubyGem + RSpec
|
284
|
+
|
285
|
+
```yaml
|
286
|
+
inherit_gem:
|
287
|
+
rubocop-ruby3_1: rubocop-lts/rubygem_rspec.yml
|
288
|
+
```
|
289
|
+
|
290
|
+
#### Linting a RubyGem w/o RSpec
|
291
|
+
|
292
|
+
```yaml
|
293
|
+
inherit_gem:
|
294
|
+
rubocop-ruby3_1: rubocop-lts/rubygem.yml
|
295
|
+
```
|
296
|
+
|
297
|
+
## 💻 Development
|
298
|
+
|
299
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
300
|
+
Then, run `rake spec` to run the tests w/ coverage,
|
301
|
+
or `bin/rake` to run tests w/ coverage, and linting.
|
302
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
303
|
+
|
304
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
305
|
+
|
306
|
+
### 🚀 Release Instructions
|
307
|
+
|
308
|
+
See [CONTRIBUTING.md][contributing].
|
209
309
|
|
210
310
|
## ⚡️ Contributing
|
211
311
|
|
@@ -213,15 +313,15 @@ See [CONTRIBUTING.md][contributing]
|
|
213
313
|
|
214
314
|
## 🌈 Contributors
|
215
315
|
|
216
|
-
[![Contributors](https://contrib.rocks/image?repo=rubocop-lts/rubocop-ruby3_1)]("https://
|
316
|
+
[![Contributors](https://contrib.rocks/image?repo=rubocop-lts/rubocop-ruby3_1)]("https://github.com/rubocop-lts/rubocop-ruby3_1/graphs/contributors")
|
217
317
|
|
218
318
|
Made with [contributors-img](https://contrib.rocks).
|
219
319
|
|
220
320
|
## 📄 License
|
221
321
|
|
222
322
|
The gem is available as open source under the terms of
|
223
|
-
the [MIT License][license] [![License: MIT]
|
224
|
-
See [LICENSE][license] for the official [Copyright Notice][copyright-notice-explainer].
|
323
|
+
the [MIT License][license] [![License: MIT][license-img]][license-ref].
|
324
|
+
See [LICENSE.txt][license] for the official [Copyright Notice][copyright-notice-explainer].
|
225
325
|
|
226
326
|
<details>
|
227
327
|
<summary>Project Logos (rubocop-ruby3_1)</summary>
|
@@ -230,27 +330,27 @@ See [docs/images/logo/README.txt][project-logos]
|
|
230
330
|
</details>
|
231
331
|
|
232
332
|
<details>
|
233
|
-
<summary>Organization Logo (rubocop-
|
333
|
+
<summary>Organization Logo (rubocop-lts)</summary>
|
234
334
|
|
235
335
|
Author: [Yusuf Evli][org-logo-author]
|
236
336
|
Source: [Unsplash][org-logo-source]
|
237
337
|
License: [Unsplash License][org-logo-license]
|
238
338
|
</details>
|
239
339
|
|
240
|
-
[project-logos]: https://
|
340
|
+
[project-logos]: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/main/docs/images/logo/README.txt
|
241
341
|
[org-logo-author]: https://unsplash.com/@yusufevli
|
242
342
|
[org-logo-source]: https://unsplash.com/photos/yaSLNLtKRIU
|
243
343
|
[org-logo-license]: https://unsplash.com/license
|
244
344
|
|
245
345
|
### © Copyright
|
246
346
|
|
247
|
-
* Copyright (c) 2022 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
|
248
|
-
|
249
|
-
[copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
347
|
+
* Copyright (c) 2022 - 2023 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
|
250
348
|
|
251
349
|
## 🤝 Code of Conduct
|
252
350
|
|
253
|
-
Everyone interacting in
|
351
|
+
Everyone interacting in this project's codebases, issue trackers, [chat rooms][🏘chat] and mailing lists is expected to follow the [code of conduct][🤝conduct].
|
352
|
+
|
353
|
+
[🤝conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/CODE_OF_CONDUCT.md
|
254
354
|
|
255
355
|
## 📌 Versioning
|
256
356
|
|
@@ -265,67 +365,36 @@ the [Pessimistic Version Constraint][pvc] with two digits of precision.
|
|
265
365
|
For example:
|
266
366
|
|
267
367
|
```ruby
|
268
|
-
spec.add_dependency "rubocop-ruby3_1", "~>
|
368
|
+
spec.add_dependency "rubocop-ruby3_1", "~> 2.0"
|
269
369
|
```
|
270
370
|
|
271
|
-
[copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
272
|
-
|
273
|
-
[gh_discussions]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/discussions
|
274
|
-
|
275
|
-
[conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/CODE_OF_CONDUCT.md
|
276
|
-
|
277
|
-
[contributing]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/CONTRIBUTING.md
|
278
|
-
|
279
|
-
[security]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/SECURITY.md
|
280
|
-
|
281
|
-
[license]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/blob/main/LICENSE.txt
|
282
|
-
|
283
|
-
[license-ref]: https://opensource.org/licenses/MIT
|
284
|
-
|
285
|
-
[semver]: http://semver.org/
|
286
|
-
|
287
|
-
[pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
288
|
-
|
289
|
-
[railsbling]: http://www.railsbling.com
|
290
|
-
|
291
|
-
[peterboling]: http://www.peterboling.com
|
292
|
-
|
293
371
|
[aboutme]: https://about.me/peter.boling
|
294
|
-
|
372
|
+
[actions]: https://github.com/rubocop-lts/rubocop-ruby3_1/actions
|
295
373
|
[angelme]: https://angel.co/peter-boling
|
296
|
-
|
297
|
-
[coderme]:http://coderwall.com/pboling
|
298
|
-
|
299
|
-
[followme-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
300
|
-
|
301
|
-
[tweetme]: http://twitter.com/galtzo
|
302
|
-
|
303
|
-
[politicme]: https://nationalprogressiveparty.org
|
304
|
-
|
305
|
-
[documentation]: https://rubydoc.info/github/rubocop-lts/rubocop-ruby3_1/main
|
306
|
-
|
307
|
-
[source]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/
|
308
|
-
|
309
|
-
[actions]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/actions
|
310
|
-
|
311
|
-
[issues]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1/-/issues
|
312
|
-
|
313
|
-
[climate_maintainability]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby3_1/maintainability
|
314
|
-
|
315
|
-
[climate_coverage]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby3_1/test_coverage
|
316
|
-
|
374
|
+
[blogpage]: http://www.railsbling.com/tags/rubocop-ruby3_1/
|
317
375
|
[codecov_coverage]: https://codecov.io/gh/rubocop-lts/rubocop-ruby3_1
|
318
|
-
|
319
376
|
[code_triage]: https://www.codetriage.com/rubocop-lts/rubocop-ruby3_1
|
320
|
-
|
321
|
-
[
|
322
|
-
|
323
|
-
[
|
324
|
-
|
325
|
-
[
|
326
|
-
|
327
|
-
[
|
328
|
-
|
329
|
-
[
|
330
|
-
|
377
|
+
[🏘chat]: https://gitter.im/rubocop-lts/community
|
378
|
+
[climate_coverage]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby3_1/test_coverage
|
379
|
+
[climate_maintainability]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby3_1/maintainability
|
380
|
+
[copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
381
|
+
[conduct]: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/main/CODE_OF_CONDUCT.md
|
382
|
+
[contributing]: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/main/CONTRIBUTING.md
|
383
|
+
[devto]: https://dev.to/galtzo
|
384
|
+
[documentation]: https://rubydoc.info/github/rubocop-lts/rubocop-ruby3_1/main
|
385
|
+
[followme]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
386
|
+
[gh_discussions]: https://github.com/rubocop-lts/rubocop-ruby3_1/discussions
|
331
387
|
[gh_sponsors]: https://github.com/sponsors/pboling
|
388
|
+
[issues]: https://github.com/rubocop-lts/rubocop-ruby3_1/issues
|
389
|
+
[liberapay_donate]: https://liberapay.com/pboling/donate
|
390
|
+
[license]: LICENSE.txt
|
391
|
+
[license-ref]: https://opensource.org/licenses/MIT
|
392
|
+
[license-img]: https://img.shields.io/badge/License-MIT-green.svg
|
393
|
+
[peterboling]: http://www.peterboling.com
|
394
|
+
[pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
395
|
+
[railsbling]: http://www.railsbling.com
|
396
|
+
[rubygems]: https://rubygems.org/gems/rubocop-ruby3_1
|
397
|
+
[security]: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/main/SECURITY.md
|
398
|
+
[semver]: http://semver.org/
|
399
|
+
[source]: https://github.com/rubocop-lts/rubocop-ruby3_1/
|
400
|
+
[tweetme]: http://twitter.com/galtzo
|
data/SECURITY.md
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Rubocop
|
2
|
+
module Ruby31
|
3
|
+
class Railtie < Rails::Railtie
|
4
|
+
railtie_name :rubocop_ruby3_1
|
5
|
+
|
6
|
+
if Rails.env.test? || Rails.env.development?
|
7
|
+
rake_tasks do
|
8
|
+
path = File.expand_path(__dir__)
|
9
|
+
Dir.glob("#{path}/rakelib/**/*.rake").each { |f| load f }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
begin
|
2
|
+
require "rubocop/gradual/rake_task"
|
3
|
+
|
4
|
+
RuboCop::Gradual::RakeTask.new(:rubocop_gradual)
|
5
|
+
desc "alias rubocop task to rubocop_gradual"
|
6
|
+
task rubocop: :rubocop_gradual
|
7
|
+
rescue LoadError
|
8
|
+
task :rubocop_gradual do
|
9
|
+
warn "NOTE: rubocop-gradual isn't installed, or is disabled for #{RUBY_VERSION} in the current environment"
|
10
|
+
end
|
11
|
+
end
|
data/lib/rubocop/ruby3_1.rb
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# external libs
|
4
|
+
require "version_gem"
|
5
|
+
|
6
|
+
# this gem
|
3
7
|
require_relative "ruby3_1/version"
|
8
|
+
# :nocov:
|
9
|
+
require_relative "ruby3_1/railtie" if defined?(Rails::Railtie)
|
10
|
+
# :nocov:
|
4
11
|
|
5
12
|
module Rubocop
|
6
13
|
# Namespace of this library
|
7
14
|
module Ruby31
|
15
|
+
module_function def install_tasks
|
16
|
+
load "rubocop/ruby3_1/tasks.rake"
|
17
|
+
end
|
8
18
|
end
|
9
19
|
end
|
20
|
+
|
21
|
+
Rubocop::Ruby31::Version.class_eval do
|
22
|
+
extend VersionGem::Basic
|
23
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Customizations/Deviations from Standard/Shopify for Ruby Coding Standards
|
2
|
+
|
3
|
+
# We want Exclude directives from different
|
4
|
+
# config files to get merged, not overwritten
|
5
|
+
inherit_mode:
|
6
|
+
merge:
|
7
|
+
- Exclude
|
8
|
+
|
9
|
+
require:
|
10
|
+
# Loads the Standard Ruby suite of gems, and configures for rubocop-lts:
|
11
|
+
- standard-rubocop-lts
|
12
|
+
# The goal here is convention over configuration...
|
13
|
+
# In light of that, we are well past having convened on Markdown for README docs and such.
|
14
|
+
- rubocop-md
|
15
|
+
# Rubygems have Rakefile as a convention, and if they don't, why not?
|
16
|
+
- rubocop-rake
|
17
|
+
# In the vast majority of cases, we will want to be warned about thread unsafe code.
|
18
|
+
# In those cases where we intentionally have thread unsafe code,
|
19
|
+
# a rubocop:disable is the least of our concerns. :D
|
20
|
+
- rubocop-thread_safety
|
21
|
+
# RuboCop Gradual can be used in "Require mode", which is a way to replace rubocop with rubocop-gradual:
|
22
|
+
- rubocop/gradual/patch
|
23
|
+
|
24
|
+
inherit_gem:
|
25
|
+
standard-rubocop-lts: config/ruby-3.1.yml
|
26
|
+
# shopify rules will override standard's rules.
|
27
|
+
rubocop-shopify: rubocop.yml
|
28
|
+
|
29
|
+
inherit_from:
|
30
|
+
- strict/ruby.yml
|
31
|
+
|
32
|
+
AllCops:
|
33
|
+
# When the Ruby community, via RuboCop, adopts a new standard
|
34
|
+
# (with additional filtering by standard.rb and rubocop-shopify) it is good enough for us!
|
35
|
+
NewCops: enable
|
36
|
+
|
37
|
+
# Metrics cops are disabled in Standard by default
|
38
|
+
Metrics:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
# Ruby specific customizations
|
42
|
+
Layout/LineLength:
|
43
|
+
Max: 120
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# These Cops Must Always Be Enabled!
|
2
|
+
# These Cops check for things that are *literally* bugs,
|
3
|
+
# and no code should ever be released that fails these cops.
|
4
|
+
#
|
5
|
+
# The Exclude: [] is crucial here:
|
6
|
+
# even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
|
7
|
+
# thus, re-activating these cops for all the files.
|
8
|
+
#
|
9
|
+
# These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
|
10
|
+
# Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
|
11
|
+
#
|
12
|
+
Rails/Output: # Don't leave puts-debugging
|
13
|
+
Enabled: true
|
14
|
+
Exclude: []
|
15
|
+
|
16
|
+
Rails/FindEach: # each could severely affect the performance, use find_each
|
17
|
+
Enabled: true
|
18
|
+
Exclude: []
|
19
|
+
|
20
|
+
Rails/UniqBeforePluck: # uniq.pluck and not pluck.uniq
|
21
|
+
Enabled: true
|
22
|
+
Exclude: []
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# These Cops Must Always Be Enabled!
|
2
|
+
# These Cops check for things that are *literally* bugs,
|
3
|
+
# and no code should ever be released that fails these cops.
|
4
|
+
#
|
5
|
+
# The Exclude: [] is crucial here:
|
6
|
+
# even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
|
7
|
+
# thus, re-activating these cops for all the files.
|
8
|
+
#
|
9
|
+
# These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
|
10
|
+
# Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
|
11
|
+
#
|
12
|
+
RSpec/Focus: # run ALL tests on CI
|
13
|
+
Enabled: true
|
14
|
+
Exclude: []
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# These Cops Must Always Be Enabled!
|
2
|
+
# These Cops check for things that are *literally* bugs,
|
3
|
+
# and no code should ever be released that fails these cops.
|
4
|
+
#
|
5
|
+
# The Exclude: [] is crucial here:
|
6
|
+
# even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
|
7
|
+
# thus, re-activating these cops for all the files.
|
8
|
+
#
|
9
|
+
# These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
|
10
|
+
# Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
|
11
|
+
#
|
12
|
+
Lint/Debugger: # don't leave binding.pry
|
13
|
+
Enabled: true
|
14
|
+
Exclude: []
|
data/rubocop.yml
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# Change the file you inherit if you:
|
2
|
+
# * use Rails,
|
3
|
+
# * are creating a RubyGem, or
|
4
|
+
# * don't use RSpec
|
5
|
+
# As follows:
|
6
|
+
# inherit_gem:
|
7
|
+
# # Pick one:
|
8
|
+
# # rubocop-ruby3_1: rubocop-lts/rails_rspec.yml # or rubocop-lts/rails.yml w/o rspec
|
9
|
+
# # rubocop-ruby3_1: rubocop-lts/ruby_rspec.yml # or rubocop-lts/ruby.yml w/o rspec
|
10
|
+
# # rubocop-ruby3_1: rubocop-lts/rubygem_rspec.yml # or rubocop-lts/rubygem.yml w/o rspec
|
11
|
+
# # Convention over configuration, hence loading this file just only Ruby and RSpec defaults:
|
12
|
+
# rubocop-ruby3_1: rubocop.yml # for the ruby + rspec
|
13
|
+
|
14
|
+
inherit_from:
|
15
|
+
- rubocop-lts/ruby_rspec.yml
|
data/sig/rubocop/ruby3_1.rbs
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-ruby3_1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -36,65 +36,175 @@ cert_chain:
|
|
36
36
|
gwGrEXGQGDZ0NIgBcmvMOqlXjkGQwQvugKycJ024z89+fz2332vdZIKTrSxJrXGk
|
37
37
|
4/bR9A==
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
39
|
+
date: 2023-05-21 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
42
|
+
name: rubocop-gradual
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop-md
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.6'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.6'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-shopify
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.13'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.13'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-thread_safety
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.5'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.5'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: standard-rubocop-lts
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.0.1
|
118
|
+
- - "<"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '2'
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 1.0.1
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '2'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: version_gem
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 1.1.2
|
138
|
+
- - "<"
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '3'
|
141
|
+
type: :runtime
|
142
|
+
prerelease: false
|
143
|
+
version_requirements: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 1.1.2
|
148
|
+
- - "<"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '3'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-packaging
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0.5'
|
62
158
|
type: :development
|
63
159
|
prerelease: false
|
64
160
|
version_requirements: !ruby/object:Gem::Requirement
|
65
161
|
requirements:
|
66
162
|
- - "~>"
|
67
163
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
164
|
+
version: '0.5'
|
69
165
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
166
|
+
name: rubocop-rspec
|
71
167
|
requirement: !ruby/object:Gem::Requirement
|
72
168
|
requirements:
|
73
169
|
- - "~>"
|
74
170
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
171
|
+
version: '2.22'
|
76
172
|
type: :development
|
77
173
|
prerelease: false
|
78
174
|
version_requirements: !ruby/object:Gem::Requirement
|
79
175
|
requirements:
|
80
176
|
- - "~>"
|
81
177
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
178
|
+
version: '2.22'
|
83
179
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
180
|
+
name: standard-rails
|
85
181
|
requirement: !ruby/object:Gem::Requirement
|
86
182
|
requirements:
|
87
|
-
- - "
|
183
|
+
- - "~>"
|
88
184
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
185
|
+
version: '0.1'
|
90
186
|
type: :development
|
91
187
|
prerelease: false
|
92
188
|
version_requirements: !ruby/object:Gem::Requirement
|
93
189
|
requirements:
|
94
|
-
- - "
|
190
|
+
- - "~>"
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: '0.1'
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: betterlint
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - "~>"
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '1.4'
|
200
|
+
type: :development
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - "~>"
|
95
205
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
97
|
-
description:
|
206
|
+
version: '1.4'
|
207
|
+
description: Configure RuboCop + a bevy of friends to gradually lint Ruby 3.1 code
|
98
208
|
email:
|
99
209
|
- peter.boling@gmail.com
|
100
210
|
executables: []
|
@@ -108,7 +218,20 @@ files:
|
|
108
218
|
- README.md
|
109
219
|
- SECURITY.md
|
110
220
|
- lib/rubocop/ruby3_1.rb
|
221
|
+
- lib/rubocop/ruby3_1/railtie.rb
|
222
|
+
- lib/rubocop/ruby3_1/rakelib/rubocop_gradual.rake
|
223
|
+
- lib/rubocop/ruby3_1/tasks.rake
|
111
224
|
- lib/rubocop/ruby3_1/version.rb
|
225
|
+
- rubocop-lts/rails.yml
|
226
|
+
- rubocop-lts/rails_rspec.yml
|
227
|
+
- rubocop-lts/rspec.yml
|
228
|
+
- rubocop-lts/ruby.yml
|
229
|
+
- rubocop-lts/ruby_rspec.yml
|
230
|
+
- rubocop-lts/rubygem.yml
|
231
|
+
- rubocop-lts/rubygem_rspec.yml
|
232
|
+
- rubocop-lts/strict/rails.yml
|
233
|
+
- rubocop-lts/strict/rspec.yml
|
234
|
+
- rubocop-lts/strict/ruby.yml
|
112
235
|
- rubocop.yml
|
113
236
|
- sig/rubocop/ruby3_1.rbs
|
114
237
|
homepage: https://github.com/rubocop-lts/rubocop-ruby3_1
|
@@ -116,10 +239,10 @@ licenses:
|
|
116
239
|
- MIT
|
117
240
|
metadata:
|
118
241
|
homepage_uri: https://github.com/rubocop-lts/rubocop-ruby3_1
|
119
|
-
source_code_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/tree/
|
120
|
-
changelog_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/
|
242
|
+
source_code_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/tree/v2.0.3
|
243
|
+
changelog_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/v2.0.3/CHANGELOG.md
|
121
244
|
bug_tracker_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/issues
|
122
|
-
documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby3_1/
|
245
|
+
documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby3_1/2.0.3
|
123
246
|
funding_uri: https://liberapay.com/pboling
|
124
247
|
wiki_uri: https://github.com/rubocop-lts/rubocop-ruby3_1/wiki
|
125
248
|
rubygems_mfa_required: 'true'
|
@@ -131,15 +254,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
254
|
requirements:
|
132
255
|
- - ">="
|
133
256
|
- !ruby/object:Gem::Version
|
134
|
-
version: 3.1
|
257
|
+
version: '3.1'
|
135
258
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
259
|
requirements:
|
137
260
|
- - ">="
|
138
261
|
- !ruby/object:Gem::Version
|
139
262
|
version: '0'
|
140
263
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
264
|
+
rubygems_version: 3.4.13
|
142
265
|
signing_key:
|
143
266
|
specification_version: 4
|
144
|
-
summary:
|
267
|
+
summary: 'Rules for Rubies: Rubocop + Standard + Betterlint + Shopify + Gradual'
|
145
268
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|