Skip to content

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

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
hreeder:docs/add-rule-code-to-tags
Nov 1, 2024
Merged

[docs] Add rule short code to mkdocs tags#14040
charliermarsh merged 2 commits intoastral-sh:mainfrom
hreeder:docs/add-rule-code-to-tags

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.

@hreeder hreeder force-pushed the docs/add-rule-code-to-tags branch from 7dffa0b to 332dee9 Compare November 1, 2024 14:10
@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Nov 1, 2024
@hreeder hreeder force-pushed the docs/add-rule-code-to-tags branch from 332dee9 to d66769b Compare November 1, 2024 14:12
@github-actions
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
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