Skip to content

Configurable checkScoverage task #41

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

Merged
merged 1 commit into from
Jul 5, 2015

Conversation

Kwestor
Copy link
Contributor

@Kwestor Kwestor commented Feb 10, 2015

checkScoverage task now can check statement, branch or line coverage.

Default behavior is to check if statement coverage is >= 75%.

To change it, add:

checkScoverage {
    coverageType = <type>
}

where <type> can be 'Line', 'Branch' or 'Statment'.

New feature comes with bunch of tests for all scenarios.

Fixes #38

Disclaimer required by the lawyers (it's covered by Apache 2, but they want me to include it in PR description):

THE FOLLOWING DISCLAIMER APPLIES TO ALL SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE:
THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.
ONLY THE SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE, IF ANY, THAT ARE ATTACHED TO (OR OTHERWISE ACCOMPANY) THIS SUBMISSION (AND ORDINARY COURSE CONTRIBUTIONS OF FUTURES PATCHES THERETO) ARE TO BE CONSIDERED A CONTRIBUTION. NO OTHER SOFTWARE CODE OR MATERIALS ARE A CONTRIBUTION.

`checkScoverage` task now can check statement, branch or line coverage.

Default behavior is to check if statement coverage is >= 75%.

To change it, add:

```
checkScoverage {
    coverageType = <type>
}
```

where `<type>` can be `'Line'`, `'Branch'` or `'Statment'`.

New feature comes with bunch of tests for all scenarios.

Fixes scoverage#38
@maiflai
Copy link
Contributor

maiflai commented Feb 11, 2015

Thanks, this looks good.

I'm not sure I can merge this immediately to master because it modifies the README, which currently documents the latest release?

I'll have a browse tonight to see if there's a better way to document usage.

@Kwestor
Copy link
Contributor Author

Kwestor commented Feb 11, 2015

You could change default branch to release, update this branch only after release and make master a development branch. That way default README will be shown for latest full release.

maiflai added a commit that referenced this pull request Jul 5, 2015
@maiflai maiflai merged commit 75beb93 into scoverage:master Jul 5, 2015
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.

checkScoverage is checking line coverage, not statement coverage
2 participants