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

Fix/lint pr annotations #14059

Merged
merged 4 commits into from
Feb 15, 2021
Merged

Fix/lint pr annotations #14059

merged 4 commits into from
Feb 15, 2021

Conversation

loremattei
Copy link
Contributor

@loremattei loremattei commented Feb 12, 2021

This PR fixes #14051 by upgrading the Violations plugin.
I also updated the GH token the plugin uses in order to consolidate across the various tools (for reasons, we have two different token used, which is confusing) and configured it to annotate the violations found by Detekt as well.

To test:

  • This PR shows a failure reported by Checkstyle.
  • This PR shows a failure reported by Detekt.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 12, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 12, 2021

You can test the changes on this Pull Request by downloading the APK here.

@loremattei loremattei requested a review from ParaskP7 February 12, 2021 16:46
@loremattei loremattei added this to the 16.8 milestone Feb 12, 2021
@loremattei loremattei marked this pull request as ready for review February 12, 2021 16:49
@ParaskP7 ParaskP7 self-assigned this Feb 15, 2021
Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @loremattei !

I have reviewed this PR as per the instructions, everything looks good, great job! 🌟 🌟

I have left one question (❓) for you to consider. Can we discuss that before merging this PR to develop?

@@ -442,7 +442,8 @@ task violationCommentsToGitHub(type: se.bjurr.violations.comments.github.plugin.
{{violation.message}}
"""
violations = [
["CHECKSTYLE", ".", ".*/build/.*\\.xml\$", "Checkstyle"]
["CHECKSTYLE", ".", ".*/build/.*\\.xml\$", "Checkstyle"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Question (❓): Wouldn't it better if we update the CheckStyle configuration to a less generic path, just like we do for Detekt?

For example: ["CHECKSTYLE", ".", ".*/build/.*/checkstyle/.*\\.xml\$", "CheckStyle"]

I am actually not sure how this path is being traversed by the Violation Comments plugin, but I worry that this regular expression might resolve into multiple paths. I speculate that the reason it works atm might be that even though this regular expression resolves into multiple paths, the first result is being taken into consideration. And, since the first result ends up being the checkstyle.xml file it works. But, this might break in the future. Wdyt?

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!
I've pushed a commit to update the filter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great @loremattei , many thanks!

I reviewed this commit and it LGTM, I will now approve and merge this PR.

Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

LGTM! 🌟

@ParaskP7 ParaskP7 merged commit 79a3884 into develop Feb 15, 2021
@ParaskP7 ParaskP7 deleted the fix/lint-pr-annotations branch February 15, 2021 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Violation Comments to GitHub Gradle Plugin Not Working
2 participants