Skip to content

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

Open
JoshuaJamesOng wants to merge 1 commit into
noveogroup:masterfrom
JoshuaJamesOng:feature/theshold
Open

Added ability to specify threshold. Task will throw an exception if t…#36
JoshuaJamesOng wants to merge 1 commit into
noveogroup:masterfrom
JoshuaJamesOng:feature/theshold

Conversation

@JoshuaJamesOng

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
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