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

Polishing of JaCoCo coverage validation changes #1091

Merged
merged 18 commits into from Jan 11, 2017
Merged

Conversation

bmuschko
Copy link
Contributor

@bmuschko bmuschko commented Jan 3, 2017

Addresses review comments made by @big-guy after merging the pull request #983.

@bmuschko bmuschko self-assigned this Jan 4, 2017
Copy link
Member

@big-guy big-guy left a comment

Choose a reason for hiding this comment

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

Thanks @bmuschko.

  • JacocoCoverageVerification should be added to the DSL guide
  • Release notes misspell the new task (JacocoCoverageVerification)
  • In JacocoReportBase, it probably makes sense to inline the fileExistsSpec in the two places it's used instead of making it part of the public API.
  • WRT documenting the setters, we should. The other classes weren't documented because they used to be Groovy and the documentation was only on the property.
  • WRT our conversation on Slack, if we make the verification check a part of the check task, we need to make the verification task behave in an incremental way (only run when something has changed).
  • It would be really nice if the failure message from JaCoCo was in the failure at the end of the build.

@bmuschko bmuschko added this to the 4.0 RC1 milestone Jan 9, 2017
@bmuschko bmuschko modified the milestones: 3.4 RC1, 4.0 RC1 Jan 10, 2017
@Override
protected void configureReport(final GroovyObjectSupport antBuilder, final JacocoViolationRulesContainer violationRules) {
if (!violationRules.getRules().isEmpty()) {
Map<String, Object> checkArgs = ImmutableMap.<String, Object>of("failonviolation", !violationRules.isFailOnViolation());
Map<String, Object> checkArgs = ImmutableMap.<String, Object>of("failonviolation", violationRules.isFailOnViolation(), "violationsproperty", VIOLATIONS_ANT_PROPERTY);
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't this always be 'false' and then we wouldn't have to catch the exception above?

Copy link
Contributor Author

@bmuschko bmuschko Jan 11, 2017

Choose a reason for hiding this comment

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

An exception would still be thrown from Ant if you provide invalid validation rules and set failonviolation = false. For more info see test case JacocoPluginCoverageVerificationIntegrationTest.Ant task reports error for unknown field value.

@big-guy
Copy link
Member

big-guy commented Jan 11, 2017

lgtm

@bmuschko bmuschko merged commit a2f3278 into master Jan 11, 2017
@big-guy big-guy deleted the jacoco-plugin-polish branch March 1, 2018 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:chore Minor issue without significant impact affects-version:3.4 in:jacoco-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants