Repository navigation
Add rubocop-gusto - #69
Merged
Merged
Conversation
Inherit the shared rubocop-gusto config, as packs, pack_stats and packwerk-extensions already do. - Add rubocop-gusto as a development dependency - Inherit rubocop-gusto's config/default.yml and load its plugin - Exclude bin/ and stop suggesting extensions - Enforce double-quoted strings (Style/StringLiterals) and convert the codebase - Apply safe autocorrections (sigils, trailing commas, let ordering, memoization form) and record the remaining unsafe-correctable and non-correctable offenses in .rubocop_todo.yml - Hand-format a few multi-line autocorrects that came out flush-left
- Enable RSpec/NotToNot, which rubocop-gusto leaves off by default - Autocorrect the `to_not` calls it flags (1 spec file) - Sort the cop configurations in .rubocop.yml alphabetically; a comment that introduced a group of cops is repeated on each cop in the group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
rubocop-gusto, the shared RuboCop config that packs, pack_stats, packwerk-extensions, rubocop-packs, singed, bigrails-redis and danger-migrations already use, to this repo.What changed
rubocop-gustoas a development dependency (spec.add_development_dependency "rubocop-gusto");Gemfile.lockonly gains the new gems, nothing is bumped..rubocop.ymlinheritsconfig/default.ymlfrom rubocop-gusto, loads its plugin, and keeps the existing cop overrides..rubocop_todo.ymlrecords the 8 remaining cops whose offenses have no safe autocorrection, generated withrubocop --auto-gen-config --exclude-limit 10000.Style/StringLiterals,EnforcedStyle: double_quotes) and converts the codebase to match.RSpec/NotToNot(rubocop-gusto leaves it off by default); autocorrects theto_notcalls in 1 spec file..rubocop.ymlare sorted alphabetically. A comment that introduced a group of cops is repeated on each cop in the group.rubocop --display-only-safe-correctablereports nothing, so the todo hides no safe fix.Gemspec/RequireMFAis disabled, as in the other repos on rubocop-gusto. Its autocorrect would addrubygems_mfa_requiredto the gemspec, which changes how the gem is published, so that is left for a separate decision.bin/is excluded (generated binstubs).spec/support/have_matching_package.rbthepackage_todo:if-expression inside the hash literal is hoisted into a local variable (hashified_package_todo); rubocop-gusto's indentation cops cannot be satisfied inside the literal. Behavior is unchanged.bundler ~> 2.2but the lockfile was written by Bundler 4, so adding a gem needs Bundler 2.x to resolve. The lockfile was resolved with 2.6.9 andBUNDLED WITHis left at 4.0.15. The pin itself is untouched.Verification
main, which used default RuboCop config)main)srb tc: no errorsCI
This repo's CI calls
shared-config's workflow, whose linter job runsbundle exec rubocop, so CI exercises the new config. CI is unchanged.