Skip to content
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

Recommend usage of require: rubocop-rails-accessibility; rename RuboCop department to "RailsAccessibility" #7

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

bensheldon
Copy link
Collaborator

@bensheldon bensheldon commented Oct 12, 2022

@accessibility-bot
Copy link

👋 Hello and thanks for pinging us! An accessibility first responder will review this soon.

  • 💻 On PRs for our review: please provide a review environment with steps to validate, screenshots (with alt text), or videos demonstrating functionality we should be checking. This will help speed up our review and feedback cycle.
  • ⚠️ If this is urgent, please visit us in #accessibility on Slack and tag the first responder(s) listed in the channel topic.

Copy link

@bolonio bolonio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of the renaming and the aligning the usage with typical Rubocop libraries. Thanks for the PR 🚀

Backwards Incompatibility When a consumer of this gem upgrades, they will need to move over to the require: directive. I think RuboCop will warn about it though. If this isn't ok, we can explore some workarounds to preserve compatibility.

Once this PR is merged I will create a new version of the gem. We will need to update dotcom after that.

@bolonio bolonio merged commit 58f3b00 into github:main Oct 18, 2022
@bensheldon bensheldon deleted the require-support branch October 18, 2022 16:54
issyl0 added a commit to issyl0/view_components that referenced this pull request Oct 21, 2022
- The `DisabledByDefault` config option made it so that "all cops in the
  default configuration are disabled, and only cops in user
  configuration are enabled", which makes cops "opt-in rather than
  opt-out" (source:
  https://github.com/rubocop/rubocop/blob/d1270c468cdb9a211229e36aef8d568ae3bfe607/config/default.yml#L91-L102).
- It's not immediately obvious that this gem has this config option.
  This means that people may write new, custom cops in downstream
  projects, with no configuration in .rubocop.yml, and then they never run
  because all cops are disabled unless explicitly enabled or otherwise
  configured with `Include`/`Exclude`.
- RuboCop does not warn users that the config inheritance has set
  `DisabledByDefault` somewhere up the line, leading to users mistakenly
  not enabling cops they may have intended to.
- Other of GitHub's open source gems, like `rubocop-github`[1] and
  `rubocop-rails-accessibility`[2], have moved away from
  `DisabledByDefault`. This is the last one (at least that I can find in
  GitHub's main project's RuboCop gem inheritance tree).

[1] - github/rubocop-github#119
[2] - github/rubocop-rails-accessibility#7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants