rubocop-gusto 10.0.0
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 +7 -0
- data/CHANGELOG.md +4 -0
- data/LICENSE +21 -0
- data/README.md +53 -0
- data/config/default.yml +781 -0
- data/config/rails.yml +122 -0
- data/exe/gusto-rubocop +12 -0
- data/exe/rubocop-gusto +9 -0
- data/lib/rubocop/cop/gusto/bootsnap_load_file.rb +57 -0
- data/lib/rubocop/cop/gusto/datadog_constant.rb +16 -0
- data/lib/rubocop/cop/gusto/execute_migration.rb +16 -0
- data/lib/rubocop/cop/gusto/factory_classes_or_modules.rb +19 -0
- data/lib/rubocop/cop/gusto/min_by_max_by.rb +45 -0
- data/lib/rubocop/cop/gusto/no_metaprogramming.rb +131 -0
- data/lib/rubocop/cop/gusto/no_rescue_error_message_checking.rb +66 -0
- data/lib/rubocop/cop/gusto/no_send.rb +32 -0
- data/lib/rubocop/cop/gusto/object_in.rb +36 -0
- data/lib/rubocop/cop/gusto/paperclip_or_attachable.rb +17 -0
- data/lib/rubocop/cop/gusto/perform_class_method.rb +73 -0
- data/lib/rubocop/cop/gusto/polymorphic_type_validation.rb +89 -0
- data/lib/rubocop/cop/gusto/prefer_process_last_status.rb +35 -0
- data/lib/rubocop/cop/gusto/rabl_extends.rb +43 -0
- data/lib/rubocop/cop/gusto/rails_env.rb +72 -0
- data/lib/rubocop/cop/gusto/rake_constants.rb +68 -0
- data/lib/rubocop/cop/gusto/regexp_bypass.rb +90 -0
- data/lib/rubocop/cop/gusto/sidekiq_params.rb +21 -0
- data/lib/rubocop/cop/gusto/toplevel_constants.rb +55 -0
- data/lib/rubocop/cop/gusto/use_paint_not_colorize.rb +240 -0
- data/lib/rubocop/cop/gusto/vcr_recordings.rb +49 -0
- data/lib/rubocop/cop/internal_affairs/assignment_first.rb +56 -0
- data/lib/rubocop/cop/internal_affairs/require_restrict_on_send.rb +62 -0
- data/lib/rubocop/gusto/cli.rb +22 -0
- data/lib/rubocop/gusto/config_yml.rb +135 -0
- data/lib/rubocop/gusto/init.rb +59 -0
- data/lib/rubocop/gusto/plugin.rb +29 -0
- data/lib/rubocop/gusto/templates/rubocop.yml +25 -0
- data/lib/rubocop/gusto/version.rb +7 -0
- data/lib/rubocop/gusto.rb +9 -0
- data/lib/rubocop-gusto.rb +13 -0
- metadata +178 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: af7e685f8d24fab93c67f028533d0a53a2bb9f02b0e628f0c8a10ed0bb61a01f
|
4
|
+
data.tar.gz: 4809c803733930fa27130942c807ff1b2c97eee5353cc0e8da9680f6493ee008
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f332bab4d720463c1533a80f6c6dfa8096f33e404ee5f761af56409f5c07c8c103b40289d0dcec632057a12b8dc668cfe623c4c23d64d98a3d052cc43495dfce
|
7
|
+
data.tar.gz: 2641e0cd3241b2a2be276c79864139884aef163ca979b00e58cc3d097c50b59b3c4e7cc1320897ae7a7761c1b6b43666e372a0478a5f368e1cea73f7eb776c37
|
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Gusto
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Rubocop::Gusto
|
2
|
+
|
3
|
+
Gusto's Ruby style guide implemented as RuboCop rules.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'rubocop-gusto', require: false
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
`rubocop-gusto` ships with an executable that updates and maintains .rubocop.yml.
|
22
|
+
|
23
|
+
```sh
|
24
|
+
bundle exec rubocop-gusto init
|
25
|
+
```
|
26
|
+
|
27
|
+
If this is an existing project, it is recommended to run the autocorrector (`bundle exec rubocop -a`) and then to regenerate the `.rubocop_todo.yml` (`bundle exec rubocop --auto-gen-config`), so issues can be dealt with piecemeal.
|
28
|
+
|
29
|
+
## Publishing New Versions
|
30
|
+
|
31
|
+
To publish a new release:
|
32
|
+
|
33
|
+
1. Update the `RuboCop::Gusto::VERSION` constant to a higher version number conforming to this project's [versioning policy](#versioning-policy).
|
34
|
+
2. Document your changes in the [changelog](CHANGELOG.md).
|
35
|
+
3. Open a pull request and follow the typical review/merge process.
|
36
|
+
4. TODO: finish release process
|
37
|
+
|
38
|
+
After publishing, wait for dependabot, or make a new PR downstream to update to the latest version.
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Submit new rules, updated configuration, and other checks to be used organization wide by submitting a Pull Request!
|
43
|
+
|
44
|
+
### Versioning policy
|
45
|
+
|
46
|
+
Rubocop-gusto generally follows semver, with the exception that the only thing that is considered a breaking change is a change in the public API to use rubocop-gusto.
|
47
|
+
|
48
|
+
Users can generally expect to need to regenerate their rubocop todo when they make a minor version bump to rubocop-gusto.
|
49
|
+
|
50
|
+
### Git Pre-Commit Hooks
|
51
|
+
```
|
52
|
+
git config core.hooksPath script/githooks
|
53
|
+
```
|