Helm-charts: Consider Adding a Mark Down Linter GitHub Action

Created on 19 Aug 2020  路  6Comments  路  Source: prometheus-community/helm-charts

As a follow-up of our discussion (me and @scottrigby) - it should be beneficial to add a GitHub Action that does Mark Down linting.

Most helpful comment

I agree pre-commit hook approach has the downside of burdening each new user with every previous problem. I find that better for internal teams than projects where we want to encourage many contributors.

superlinter looks pretty cool! Calls https://github.com/igorshubovych/markdownlint-cli#readme which calls https://github.com/DavidAnson/markdownlint anyway鈥β爊ice 馃槃 I leave it to the maintainers to decide, but I see nothing wrong in this approach personally from a charts repo CI perspective.

All 6 comments

Cool idea. Someone may want to play with these in a PR: https://github.com/marketplace?type=actions&query=markdownlint I would recommend a separate GitHub Actions workflow for this.

Would be nice if one could execute the same linter locally. I personally like https://pre-commit.com/ as it allows to lint only modified files.

Sounds like someone wants to write a GH Action 馃槈 (I can relate! They're super-fun)

One note: @Xtigyro mentioned the markdownlint vscode plugin for local work: https://github.com/DavidAnson/vscode-markdownlint (can also be run apart from vscode https://github.com/DavidAnson/markdownlint).

I added two draft PRs to demonstrate two different approaches. One is using pre-commit and the other one super-linter.

No matter for which we decide we should fix lint errors on all files to improve contributor experience. For example super-linter just checks modified files, which is the reason why everything is ok. It would be bad if we force the first contributor modifying a file to fix all linting errors.

PS: Sorry for the not so well created PRs. It's just terrible trying to author something on a mobile :-)

I agree pre-commit hook approach has the downside of burdening each new user with every previous problem. I find that better for internal teams than projects where we want to encourage many contributors.

superlinter looks pretty cool! Calls https://github.com/igorshubovych/markdownlint-cli#readme which calls https://github.com/DavidAnson/markdownlint anyway鈥β爊ice 馃槃 I leave it to the maintainers to decide, but I see nothing wrong in this approach personally from a charts repo CI perspective.

Yeah - I think that's fine. I like superlinter!
I'm also not in favour of pre-commit hooks - my arguments are exactly the same as stated by @scottrigby above.

Was this page helpful?
0 / 5 - 0 ratings