-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pre-commit: Add markdownlint support #4222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the comments in .pre-commit-config.yam. You now also have to install Ruby in addition to Python for running the pre-commit hooks.
Are you sure? According to https://pre-commit.com/#ruby, ruby hooks work without any system level dependencies. It should download a suitable ruby installation automatically. |
The list is redundant as the hooks can be found by reading the rest of the file and it prone to become outdated.
The pre-commit hook failed until I manually installed |
|
This looks like you have an incomplete ruby version installed. According to the code, it should only use the system ruby if you have both |
@uklotzde please retest, it should now always install ruby regardless of the system. |
None of the Ruby stuff was installed ( The first check took ages and failed again:
|
ef9ea0e
to
054d373
Compare
I opened a bug report upstream: pre-commit/pre-commit#2016 @uklotzde For now I switched to a nodejs-based markdown linter. Please retest. |
Nice side-effect: If you already use his markdownlint VS Code plugin then the configuration is recognized and warnings are also shown there. |
I still get warnings in CONTRIBUTING.md: SKIP=end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch \
pre-commit run --all-files |
Weird. I don't get any warnings. Maybe it also uses some global config from vscode? |
No, CONTRIBUTING.md does not exist in my tree, because this PR targets the 2.3 branch. |
My bad, tested on main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! LGTM
This prevents introducing broken markdown.