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

fix: set the exit code for json output #269

Merged
merged 1 commit into from
Apr 7, 2021
Merged

Conversation

barrett-schonefeld
Copy link
Contributor

Purpose:

  • Want the exit code set properly for json output.

Changes:

  • Move the logic to set the exit code so that it applies to json output as well.
  • If the warnings limit exceeded, add this as an error to the results so that it may be naturally included in the json output.

Tests:

  • repair warnings limit tests and exit code tests

Copy link
Member

@dpopp07 dpopp07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one comment, but looks good! I like the idea of including the warning limit message in the list of errors instead of a console log 👍

src/cli-validator/runValidator.js Outdated Show resolved Hide resolved
Purpose:
- Want the exit code set properly for json output.

Changes:
- Move the logic to set the exit code so that it applies to json output as well.
- If the warnings limit exceeded, add this as an error to the results so that it may be naturally included in the json output.

Tests:
- repair warnings limit tests and exit code tests
@barrett-schonefeld barrett-schonefeld merged commit b6e9899 into main Apr 7, 2021
@barrett-schonefeld barrett-schonefeld deleted the fix-exit-code branch April 7, 2021 16:30
dpopp07 pushed a commit that referenced this pull request Apr 7, 2021
## [0.40.1](v0.40.0...v0.40.1) (2021-04-07)

### Bug Fixes

* set the exit code for json output ([#269](#269)) ([b6e9899](b6e9899))
@dpopp07
Copy link
Member

dpopp07 commented Apr 7, 2021

🎉 This PR is included in version 0.40.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants