-
Notifications
You must be signed in to change notification settings - Fork 23
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 make format
to lint Markdown
#267
Comments
Thanks @MaxGhenis! No, we don't have a linter set up on Markdown, and I agree it makes reviews more cumbersome and adds noise to every PR. I would very much welcome a PR setting up an editorconfig, and even better adding markdownlint or equivalent in CI! |
This commit adds a lint job to the CI pipeline. It uses an up to date Markdown linter https://github.com/DavidAnson/markdownlint-cli2. I looked for an alternative from the Python ecosystem (to stay more consistent with this project), but the only result was an outdated and unmaintained project. It would be possible to add a `make format` command as was suggested in the original GitHub issue, but this would require Node.js to be available in the dev environment, so I thought setting up CI only would be good enough for now. Note: it should be as easy as adding the following to the Makefile: ``` format: npx markdownlint-cli2-fix "**/*.md" ``` Closes openfisca#267
This commit adds a lint job to the CI pipeline. It uses an up to date Markdown linter https://github.com/DavidAnson/markdownlint-cli2. I looked for an alternative from the Python ecosystem (to stay more consistent with this project), but the only result was an outdated and unmaintained project. It would be possible to add a `make format` command as was suggested in the original GitHub issue, but this would require Node.js to be available in the dev environment, so I thought setting up CI only would be good enough for now. Note: it should be as easy as adding the following to the Makefile: ``` format: npx markdownlint-cli2-fix "**/*.md" ``` Closes openfisca#267
Thank you so much @RobinCsl for your contribution, and sorry for the delay in handling it (I was off the last two weeks)! I just checked it out and set up Markdownlint to match the existing style, and fixed all (very relevant) errors. We thus will get the following benefits, beyond the linting itself:
|
Do the docs use a common markdown formatter? In #266 VSCode automatically formatted the file. I'd be happy to use a different formatter, or I can start over there and avoid the autoformatter, but a
make format
would be convenient.The text was updated successfully, but these errors were encountered: