markdownlint-cli
markdownlint-cli copied to clipboard
Allow for 'warn only' behavior
Would be nice if markdownlint-cli just allowed for output of linting violations but did not exit 1. This would effectively be "warn" instead of "error".
There's a request to make error/warning configurable per-rule: https://github.com/DavidAnson/markdownlint/issues/254
But for this scenario, could you just ignore the tool's exit code?
I'm currently running this in a GitHub Actions workflow and still working on how I can get it to "ignore" the error code. So TBD there :)
Update: using set +e ... set -e got me around this for now.
While per-rule would also be nice (many linters support this as I'm sure you know) an overall setting is also. For this situation I would hate to have to go thru and specify every single supported rule just to override with "warn".
FYI that CLI2 has a a GitHub Action ready to go: https://github.com/DavidAnson/markdownlint-cli2-action
Here’s how to ignore a failure: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
ah thanks for the GH Action reference!