readthedocs.org icon indicating copy to clipboard operation
readthedocs.org copied to clipboard

Setup vale linter bot

Open humitos opened this issue 5 years ago • 11 comments

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 avatar Jul 02 '19 11:07 humitos

@humitos I've worked with github apps and I would like to work on this issue.

pranay414 avatar Jul 03 '19 17:07 pranay414

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 avatar Jul 03 '19 17:07 humitos

@humitos Sure, that'll be great.

pranay414 avatar Jul 03 '19 17:07 pranay414

@humitos can you tell me the list of lint checks that needs to be performed?

pranay414 avatar Jul 04 '19 06:07 pranay414

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 avatar Jul 08 '19 06:07 humitos

@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?

pranay414 avatar Jul 10 '19 17:07 pranay414

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 avatar Jul 10 '19 22:07 humitos

@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:

  1. Fork vale-linter-bot and customise it to lint all types of file or maybe file an issue in that repo to resolve it.
  2. Set up Vale as an editor extension. What do you think?

pranay414 avatar Jul 11 '19 05:07 pranay414

Is this still a need? Happy to continue the investigation.

santos22 avatar May 19 '20 15:05 santos22

@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.

santos22 avatar Jun 11 '20 15:06 santos22

Is the Vale-linter bot still needed? I am working on it.

ppansare avatar Aug 11 '22 22:08 ppansare