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

Request: Exit with code other than 0 if command-line args are malformed #409

Closed
alexdewar opened this issue Jul 5, 2023 · 1 comment
Closed
Labels

Comments

@alexdewar
Copy link

We use markdownlint-cli all over the place in our CI system via the pre-commit hook (thanks for making it, btw!) and I've just noticed that the hook isn't actually running in a bunch of our repositories, because we're passing in dud command-line arguments, namely we've forgotten the terminating -- after the list of rules to disable. markdownlint still terminates with exit code 0 though, so the pre-commit hook still passes. It would be better if it returned a non-zero exit code so that users don't accidentally break the hook like we did.

alexdewar added a commit to ImperialCollegeLondon/poetry_template_2 that referenced this issue Jul 5, 2023
Unfortunately it seems that this hook has been broken since it was
introduced. The problem is that when disabling rules you need an extra
"--" at the end of the list. See: https://github.com/igorshubovych/markdownlint-cli

Frustratingly, passing malformed arguments to markdownlint-cli means
that the hook always passes (!). Upstream issue: igorshubovych/markdownlint-cli#409

I re-ran the hook on this repo, though, and there were no issues with
the markdown.
@DavidAnson
Copy link
Collaborator

Duplicate of #104 (and see related issues)

@DavidAnson DavidAnson closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants