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

Allow for 'warn only' behavior #177

Open
brandonh-msft opened this issue Mar 22, 2021 · 4 comments
Open

Allow for 'warn only' behavior #177

brandonh-msft opened this issue Mar 22, 2021 · 4 comments

Comments

@brandonh-msft
Copy link

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".

@DavidAnson
Copy link
Collaborator

There's a request to make error/warning configurable per-rule: DavidAnson/markdownlint#254

But for this scenario, could you just ignore the tool's exit code?

@brandonh-msft
Copy link
Author

brandonh-msft commented Mar 22, 2021

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".

@DavidAnson
Copy link
Collaborator

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

@brandonh-msft
Copy link
Author

ah thanks for the GH Action reference!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants