readthedocs.org
readthedocs.org copied to clipboard
Setup vale linter bot
vale
is a linter that we can add to our CI or even a GitHub bot to validate our documentation. This will allow us to avoid the usage of RTD
instead of Read the Docs
and other branding words, for example.
It would be pretty handy to setup it in our repository: https://github.com/apps/vale-linter
@humitos I've worked with github apps and I would like to work on this issue.
Please, go ahead. I've never done it before, so you will need to research a little to configure it by yourself. I can help you by reviewing the PR after that.
@humitos Sure, that'll be great.
@humitos can you tell me the list of lint checks that needs to be performed?
For now a simple list like,
rtd
RtD
RTD
that change it to Read the Docs
it's fine. We can add more later once it's setup.
@humitos I went through the source code of vale-linter-bot
and it currently lints only markdown
files but we want it to lint reStructured Text
right?
Yes, I've never used it though
Although, in the page that I liked in the description it says
Vale is a natural language linter that supports plain text, markup (Markdown, reStructuredText, AsciiDoc, and HTML), and source code comments.
@humitos Vale
is a CLI to lint plain text, markup (Markdown, reStructuredText, AsciiDoc, and HTML), and source code comments. On the other hand vale-linter-bot
is a bot which runs Vale
to lint only Markdown
files. I think we can do one of the following things:
- Fork
vale-linter-bot
and customise it to lint all types of file or maybe file an issue in that repo to resolve it. - Set up
Vale
as an editor extension. What do you think?
Is this still a need? Happy to continue the investigation.
@humitos @stsewd https://github.com/readthedocs/readthedocs.org/pull/7126 should close this.
The failed build is due to the linting errors which I have not fixed yet so others can see how it works. I'd also like to follow up on the other checks mentioned in the pull request.
Is the Vale-linter bot still needed? I am working on it.