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

Validate markdown and rst file formatting #912

Open
bhirsz opened this issue Jul 10, 2023 · 4 comments
Open

Validate markdown and rst file formatting #912

bhirsz opened this issue Jul 10, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@bhirsz
Copy link
Member

bhirsz commented Jul 10, 2023

We have several markdown or rst files in the repository. We need a way to validate them - for example using linters in precommit. Afaik Airflow uses such scripts so we can start from there.

@bhirsz bhirsz added the documentation Improvements or additions to documentation label Jul 10, 2023
@mnojek mnojek added this to the 4.1.0 milestone Jul 12, 2023
@bhirsz
Copy link
Member Author

bhirsz commented Jul 16, 2023

The problem is that most popular Markdown linter is node js based (https://github.com/igorshubovych/markdownlint-cli). There are Python tools (such as https://github.com/jackdewinter/pymarkdown/tree/main) and they are working fine though they are more pain to configure - it is under active development and not everything is mature enough.

We can either run our precommit in docker (troublesome locally but we could run markdown etc linter in CI) or focus on supporting only Python-based tools or use MegaLinter in our CI (which prepares all different linters in docker image). I'm voting for the last since it's the least troublesome to implement and we can decide on replacing it later if the need arise.

@bhirsz
Copy link
Member Author

bhirsz commented Jul 16, 2023

Bonus is that MegaLinter supports multiple formats (rst, markdown, yaml linters on top of programming languages) and can be run either locally or in CI - we are getting Docker image ready to use.

@mnojek
Copy link
Member

mnojek commented Jul 16, 2023

Good idea, I think using MegaLinter is a good idea. And with it we will have more linters to use in our CI.
Also, we will start a mutual relation here, since we want to add Robocop to their tool as well ;)

@bhirsz
Copy link
Member Author

bhirsz commented Aug 8, 2023

Partly implemented by #919. Markdown files are validated. There are some issues with rst files - I will raise separate PR that enables and fixes configuration for the linter

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

No branches or pull requests

2 participants