Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Docs/Update custom evaluator sample #194

Merged
merged 5 commits into from
May 30, 2019

Conversation

lgvalle
Copy link
Contributor

@lgvalle lgvalle commented May 30, 2019

This PR:

  • Adds a more elaborated code sample for custom evaluators
  • Fix the previous sample code (as it won't compile as it was)
  • Fix the link path to Violations source code

tasomaniac
tasomaniac previously approved these changes May 30, 2019
Copy link
Contributor

@tasomaniac tasomaniac left a comment

Choose a reason for hiding this comment

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

Looks good. 👍 I couldn't see the change you mentioned about the sample.

```gradle
evaluator { Set allViolations ->
allViolations.each { violation ->
if (violation.name == "PMD" && (violation.errors > 5)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Below it says toolName but here it is name. Which one it is? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! The backing property is called toolName but the method to access it is getName (and I'm guessing that's why the compiler allows .name as accessor?)

Do you think we shall stick to just name in the sample to create less confusion?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like toolName is private. We shouldn't really mention that since it is not usable. Sticking to name makes sense 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

amended here d3da57b

@tasomaniac tasomaniac merged commit e200ad9 into master May 30, 2019
@tasomaniac tasomaniac deleted the docs/update-custom-evaluator-sample branch May 30, 2019 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants