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

[docs] Add rule short code to mkdocs tags #14040

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

hreeder
Copy link
Contributor

@hreeder hreeder commented Nov 1, 2024

Summary

This PR updates the metadata in the YAML frontmatter of the mkdocs documentation to include the rule short code as a tag, so it can be easily searched.
Ref: #13684

Test Plan

This has been tested locally using the documentation provided here for generating docs.

This generates docs that now have the tags section:

---
description: Checks for abstract classes without abstract methods.
tags:
- B024
---

# abstract-base-class-without-abstract-method (B024)
... trimmed

I've also verified that this gives the ability to get straight to the page via search when serving mkdocs locally.

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@hreeder hreeder marked this pull request as ready for review November 1, 2024 14:33
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

@charliermarsh charliermarsh self-assigned this Nov 1, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) November 1, 2024 15:45
@charliermarsh charliermarsh merged commit 099f077 into astral-sh:main Nov 1, 2024
18 checks passed
TomerBin pushed a commit to TomerBin/ruff that referenced this pull request Nov 3, 2024
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
This PR updates the metadata in the YAML frontmatter of the mkdocs
documentation to include the rule short code as a tag, so it can be
easily searched.
Ref: astral-sh#13684

## Test Plan

<!-- How was it tested? -->
This has been tested locally using the documentation provided
[here](https://docs.astral.sh/ruff/contributing/#mkdocs) for generating
docs.

This generates docs that now have the tags section:
```markdown
---
description: Checks for abstract classes without abstract methods.
tags:
- B024
---

# abstract-base-class-without-abstract-method (B024)
... trimmed
```

I've also verified that this gives the ability to get straight to the
page via search when serving mkdocs locally.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants