-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📌 Loosen RuboCop dep requirements #63
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain lgtm
platform lgtm
If this is a desired change, should I work on fixing the test suite in GA? |
⭕ What is the release cadence for betterlint? If the gem restrictions remain locked down to patch level as they are, and the gem is not released frequently, I'll have to stop using it in my projects, because the rest of the Ruby world is moving forward and this gem is now a blocker on several fronts, but most annoyingly on P.S. the voluminous deprecation warnings are also a significant bother: #66 |
…itation. - https://github.com/Betterment/betterlint/actions/runs/12437356175/job/34727086761?pr=63 - ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux]
@smudge Needs another workflow run approval? |
.github/workflows/heads.yml
Outdated
- ruby: "truffleruby-head" | ||
appraisal: "rails-8-0" | ||
taskname: "spec" | ||
gemfile: "appraisal_root" | ||
rubygems: latest | ||
bundler: latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been operating largely as an MRI-only shop. Not rejecting this outright, but I'd be interested in the motivation for including it in a separate heads matrix.
For now, I'd be inclined to defer this to a separate PR/discussion, and consolidate MRI head down into tests.yml
(if building against head is even an active goal here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building against head
is just a canary, an early warning about upcoming technical debt when you discover things will potentially break in the next Ruby release, once it is released.
IMO it is most useful as a discrete workflow because it should be allowed to fail, and while GitHub doesn't have a proper "allow failures" feature, they should, and they will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the truffleruby-head. I add it to my open source gems whenever I can because I like to support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this churn getting the CI to work is because your setup is different from the type I usually run (I always add development dependencies to the gemspec, in violation of the default RuboCop rule, because it simplifies things for me...) I'll have it working shortly.
Error: The `RSpec/Capybara/FeatureMethods` cop has been removed since this cop has migrated to `RSpec/Dialect`. Please use `RSpec/Dialect` instead. (obsolete configuration found in config/default.yml, please update it) `RSpec/Capybara/*` has been extracted to the `rubocop-capybara` gem. (obsolete configuration found in config/default.yml, please update it) Error: unrecognized cop or department FactoryBot/AssociationStyle found in config/default.yml unrecognized cop or department FactoryBot/ConsistentParenthesesStyle found in config/default.yml unrecognized cop or department FactoryBot/SyntaxMethods found in config/default.yml
betterlint.gemspec
Outdated
s.add_dependency "rubocop-capybara", "~> 2.21" | ||
s.add_dependency "rubocop-factory_bot", "~> 2.26" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be interested in adding rubocop-capybara
and rubocop-factory_bot
in an independent PR as well. I'm not sure if they were intentionally excluded, but baking them into our in-house preferences would merit at least a separate set of sign-offs, and I'd like to keep the path clear for you to merge this PR sooner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are rules in the default config which make it impossible to run without them. It seems they are currently accidental undeclared dependencies. I only added them because I was forced to.
Errors were:
Error: The `RSpec/Capybara/FeatureMethods` cop has been removed since this cop has migrated to `RSpec/Dialect`. Please use `RSpec/Dialect` instead.
(obsolete configuration found in config/default.yml, please update it)
`RSpec/Capybara/*` has been extracted to the `rubocop-capybara` gem.
(obsolete configuration found in config/default.yml, please update it)
and
Error: unrecognized cop or department FactoryBot/AssociationStyle found in config/default.yml
unrecognized cop or department FactoryBot/ConsistentParenthesesStyle found in config/default.yml
unrecognized cop or department FactoryBot/SyntaxMethods found in config/default.yml
AFACT, if they are removed, then the rules in the default config must be removed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I did remove the Capybara rule it complained about, because the replacement suggestion didn't make much sense to me, saying both RSpec/Dialect
, and rubocop-capybara
, which don't sound related.
But since it had been there it was clear that rubocop-capybara
was intended to be a dependency. I don't mind removing it, as I don't think there are any rules remaining that relate to it.
The factory-bot rules are still in the config though, so I think the gem is still required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GitHub Actions workflows are now passing! This is ready for review.
I removed rubocop-capybara
, but not rubocop-factory_bot
, since the build won't pass without it (see comments above).
It is great to use this gem in tandem with
standard
, but when they get out of sync it is painful. It isn't clear why the patch restriction is useful (aside fromrubocop
not following semantic versioning, while claiming it does). In practice it is not useful to me, as I constrainrubocop
separately, so I've removed it. I don't expect this to get merged, but would like to understand the thinking behind the constraints. Maybe it would be useful to add them as comments to the gemspec.