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

[Feature]: Consider switching to Vale linter #1009

Open
peterjunpark opened this issue Nov 7, 2024 · 5 comments
Open

[Feature]: Consider switching to Vale linter #1009

peterjunpark opened this issue Nov 7, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@peterjunpark
Copy link
Contributor

peterjunpark commented Nov 7, 2024

Suggestion Description

Vale is an open-source command-line tool to enforce editorial style. I believe updating our docs linting CI to use Vale could significantly improve the workflow for docs contributors and the overall writing quality/consistency of the docs. See https://vale.sh/docs/. (and blogs...)

Some further reading: https://www.datadoghq.com/blog/engineering/how-we-use-vale-to-improve-our-documentation-editing-process/

Editorial style

Google Developer Documentation style guide

The ROCm docs are aligned with the Google Developer Documentation Style Guide. Vale has built-in support for Google style guide rules through https://vale.sh/hub/google/, allowing us to enforce these rules automatically. Additional editorial style guides are available and can be easily integrated through other add-ons on at https://vale.sh/hub/.

Custom editorial rules can also be created to address ROCm-specific stylistic preferences, enhancing the clarity and consistency of our technical language.

This would simplify and speed up documentation reviews.

Blocking/non-blocking style violations

Vale’s configurable rules let us categorize certain violations as blocking (key terminology errors, etc) to prevent merging, while others can be non-blocking, serving only as style suggestions. This allows a balanced approach to enforcing editorial standards without causing unnecessary interruptions.

Example use case: trademark symbol

We should have a trademark symbol on every first instance of an AMD product name on each page. This (and other custom rules) are enforceable using https://vale.sh/explorer/trademarks/.

Markup formats

Vale supports rST and MD out-of-the-box. We can easily add custom rules for Sphinx directives if needed. We can also lint source code comments for API docs generated by Doxygen.

Wordlist

See https://vale.sh/docs/topics/vocab/.

GitHub action

https://github.com/errata-ai/vale-action

Editor integration

Vale also has in-editor support, providing real-time linting with red underlines to highlight style violations as contributors write. This promotes consistency from the start of the writing process.

Operating System

No response

GPU

No response

ROCm Component

No response

@peterjunpark peterjunpark added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 7, 2024
@peterjunpark
Copy link
Contributor Author

@alexxu-amd @samjwu @lpaoletti @yhuiYH Do you think this is worth looking into?

@lpaoletti
Copy link

I don't think we're ready to move there.
This is not a priority compared to the other changes we need to make.

@yhuiYH
Copy link
Contributor

yhuiYH commented Nov 7, 2024

I think it's worth looking in to for sure. I've been wanting to enable spell checks on all repos. Link checking linter too, if we have one to use.

I haven't looked too closely, but can we just add vale linter to run in parallel with our current linters? To evaluate?

@lpaoletti
Copy link

We used this at my previous company - it works well. But the initial hit can be overwhelming.

@samjwu
Copy link
Member

samjwu commented Nov 7, 2024

setting up a GA just to run seems to be simple with https://github.com/errata-ai/vale-action

configuration of custom rules for things like language style I expect would take the longest time investment, and would have to be headed by the writing team

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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants