Skip to content

Apply pmd to airbyte-config #13003

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 19 commits into from
May 24, 2022
Merged

Apply pmd to airbyte-config #13003

merged 19 commits into from
May 24, 2022

Conversation

alovew
Copy link
Contributor

@alovew alovew commented May 18, 2022

What

  • Add pmd gradle plugin and fail the build on failures
  • Add a pmd rules XML file updated to exclude all rules that we are currently violating (for now)
  • Exclude the airbyte-integrations subproject to exclude connectors
  • Apply pmd changes to airbyte-config subproject

How to Review

Adding the plugin & creating rules for it:

  • Look at build.gradle
  • Look at rules.xml

Fixing rule violations for airbyte-config:

  • All the other files
  • Pay attention to places where I use SuppressWarning (in case you think I shouldn't suppress it)

@github-actions github-actions bot added area/api Related to the api area/platform issues related to the platform area/protocol labels May 18, 2022
@github-actions github-actions bot removed area/api Related to the api area/platform issues related to the platform area/protocol labels May 18, 2022
@alovew alovew temporarily deployed to more-secrets May 18, 2022 23:24 Inactive
@alovew alovew temporarily deployed to more-secrets May 18, 2022 23:24 Inactive
@alovew alovew temporarily deployed to more-secrets May 18, 2022 23:55 Inactive
@alovew alovew temporarily deployed to more-secrets May 18, 2022 23:55 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 18:49 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 18:49 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 19:43 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 19:43 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 23:09 Inactive
@alovew alovew temporarily deployed to more-secrets May 19, 2022 23:10 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 00:23 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 19:21 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 20:35 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 20:35 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 21:00 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 21:00 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 21:42 Inactive
@alovew alovew temporarily deployed to more-secrets May 20, 2022 21:43 Inactive
@alovew alovew requested review from jdpgrailsdev and lmossman May 20, 2022 22:10
@alovew
Copy link
Contributor Author

alovew commented May 20, 2022

To be clear, this PR applies the PMD changes to the airbyte-config subproject since I was originally going to split up tickets to apply the rules one sub-project at a time. Instead, I've switched it so that we'll apply rules one ruleset at at time, but since I already did the work for airbyte-config I figured I should keep that one.

@alovew alovew temporarily deployed to more-secrets May 23, 2022 06:49 Inactive
@alovew alovew temporarily deployed to more-secrets May 23, 2022 06:49 Inactive
@jdpgrailsdev
Copy link
Contributor

  • Exclude the airbyte-integrations subproject to exclude connectors

@alovew I didn't see this in the build.gradle script. Did this get missed or not committed (or am I just overlooking it)?

@alovew alovew temporarily deployed to more-secrets May 23, 2022 17:27 Inactive
@alovew alovew temporarily deployed to more-secrets May 23, 2022 17:27 Inactive
@alovew alovew temporarily deployed to more-secrets May 23, 2022 17:52 Inactive
@alovew alovew temporarily deployed to more-secrets May 23, 2022 17:52 Inactive
@alovew
Copy link
Contributor Author

alovew commented May 23, 2022

@jdpgrailsdev the connectors exclusion is added as an exclude-pattern in rules.xml

@jdpgrailsdev
Copy link
Contributor

jdpgrailsdev commented May 23, 2022

@jdpgrailsdev the connectors exclusion is added as an exclude-pattern in rules.xml

@alovew Ah...thanks. We may want to move that into the build.gradle and use Gradle's support to filter out classes before it ever feeds them to PMD. My thought is that when we need to add/remove excludes, it will probably be across all of the tools, not just PMD, so having the excludes all in the same file (build.gradle), though spread out, would be easier to find. Not necessary for this PR, as we can do it when we add the next module to PMD, etc.

@alovew
Copy link
Contributor Author

alovew commented May 23, 2022

@jdpgrailsdev ah I see, yeah that's a good point, we should definitely change it to excluding that way at some point.

Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

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

:shipit:

@alovew alovew merged commit ab070a7 into master May 24, 2022
@alovew alovew deleted the anne/apply-pmd branch May 24, 2022 17:58
jscottpolevault pushed a commit to jscottpolevault/airbyte that referenced this pull request Jun 1, 2022
* Apply pmd to airbyte-config, exclude rules for now
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.

2 participants