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

Fix incorrect documentation URLs when using rubocop --show-docs-url #1368

Merged
merged 1 commit into from Aug 30, 2022

Conversation

r7kamura
Copy link
Contributor

@r7kamura r7kamura commented Aug 23, 2022

Added DocumentationBaseURL for rubocop --show-docs-url [COP1,COP2,...] command to work correctly for rubocop-rspec cops.

Before

$ bundle exec rubocop --show-docs-url RSpec/Be
https://docs.rubocop.org/rubocop/cops_rspec.html#rspecbe

After

$ bundle exec rubocop --show-docs-url RSpec/Be
https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbe

Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded in default/config.yml to the next minor version.

If you have modified an existing cop's configuration options:

  • Set VersionChanged in config/default.yml to the next major version.

@koic
Copy link
Member

koic commented Aug 24, 2022

Is the following issue resolved?
rubocop/rubocop-rails#756 (comment)

@r7kamura r7kamura force-pushed the feature/url branch 2 times, most recently from 7aa91ec to b3168d5 Compare August 24, 2022 02:17
@r7kamura r7kamura changed the title Add DocumentationBaseURL Fix incorrect documentation URLs when using rubocop --show-docs-url Aug 24, 2022
Copy link
Member

@Darhazer Darhazer left a comment

Choose a reason for hiding this comment

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

Thank you

@Darhazer Darhazer merged commit 1a98909 into rubocop:master Aug 30, 2022
@r7kamura r7kamura deleted the feature/url branch August 30, 2022 10:08
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.

None yet

3 participants