-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add vale linter bot #7126
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
Add vale linter bot #7126
Conversation
Build is now failing! Can follow-up and fix the incorrect usages of "Read the Docs" after someone sees this to confirm that it does work 👍 https://travis-ci.org/github/readthedocs/readthedocs.org/jobs/691165858 |
The following can be added to .vale.ini.
I've attached some screenshots on what this looks like but did not include in this pull request. There's some weirdness with the Spelling rule where it doesn't recognize terms like MkDocs, Conda, etc. Looks like we can add an text file with terms to ignore (https://errata-ai.github.io/vale/styles/#spelling). The errors for repetition are because of reStructuredText headings and that same word coming right after. There was a valid repetition caught that can be fixed as part of this PR. SpellingRepetition
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems useful, if it doesn't add too much time to our builds. Our CI is already really slow, but I could see this being useful for our docs.
level: error | ||
swap: | ||
Read The Docs: Read the Docs | ||
RTD: Read the Docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to enable this usage in some places, but the above rule makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can disable and enable with the following markup comments:
Read The Docs
.. vale off
Read The Docs
.. vale on
Read The Docs
So in that example, an error would be thrown for text before .. vale off
and for text after .. vale on
.
Source: https://errata-ai.gitbook.io/vale/getting-started/markup#restructuredtext
If the linter is not needed at this point in time, I can re-purpose this PR to fix the incorrect usages of "Read the Docs" and the spelling and repetition errors. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Fixes #5876
😄 I was inspired by the following projects since they had vale set up:
TODO: