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

Added ability to specify threshold. Task will throw an exception if t… #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoshuaJamesOng
Copy link

…hreshold breached. Default of -1 means threshold disabled.

…hreshold breached. Default of -1 means threshold disabled.
@JoshuaJamesOng
Copy link
Author

@smalichenko I believe you're the core maintainer now, can you please review this PR?

Use Case: Introducing static analysis into existing legacy projects where continuous integration server does not support threshold plugin e.g. BitBucket/GitLab. These projects will have a large number of pre-existing issues that will take time to resolve. In the mean time, new code should be subject to analysis and builds should fail when new issues are introduced.

Implementation Choices The value defaults to -1 which will disable this check on a per tool basis, as users of e.g. Jenkins will not require and it would be unfair to force them to maintain this value. If 0 or greater is entered as a value, and the report contains and error count greater than the threshold, then the same exception as abortOnError will be thrown - causing CI systems to fail the build. The value is exclusive, so that if the existing project reports 100 issues then an exception should not be thrown until the threshold (100) is broken

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

Successfully merging this pull request may close these issues.

1 participant