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

build: remove inconsistent code analysis / align with hedera-services #2016

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

jjohannes
Copy link
Contributor

@jjohannes jjohannes commented Sep 30, 2024

Description:
Addresses the following items in #1794

  • Introduce Guava fix, which should be in plugin in the future
  • Get rid of mergeJar("com.google.code.findbugs:jsr305")
  • (Partially) Adjust the code style rules and tools to what its done in hedera-services

This removes the setups for: sonar, error prone, spotbugs. Justification:

  • Spotbugs does not run as part of the pipeline, but if you run it it gives a ton of errors
  • Instead of sonar, we should use codacy as we do in hedera-servcies once we have the same Gradle setup
  • Error prone did not really run, because it is an annotation processor that produces warnings but all warnings were turned off with this comment (??):
    // Disable warnings because I'm tired of them :P
    options.isWarnings = false

As we also do not use (and configure) these tools in hedera-services, my suggestion is to remove them for now. We can re-introduce one of these tools later again, but then with proper configuration that checks what you want to check and that works with errors (and not warnings).

Instead, the javac linting capabilities are now configured similar to how it is done in hedera-services. As preparation for sharing this configuration in the next step (hashgraph/hedera-services#14255).

Related issue(s):

#1794 / hashgraph/hedera-services#14255

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@jjohannes jjohannes self-assigned this Sep 30, 2024
@jjohannes jjohannes marked this pull request as ready for review October 1, 2024 13:21
@jjohannes jjohannes requested review from a team as code owners October 1, 2024 13:21
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

You have missed one @Var in KeyTest.java

@jjohannes
Copy link
Contributor Author

Thanks @0xivanov - fixed.

Do you think this can be merged, or is there anything you would like to keep?

@jjohannes jjohannes force-pushed the 1794-static-code-analysis branch 3 times, most recently from 63438db to 170d10d Compare October 7, 2024 15:15
0xivanov
0xivanov previously approved these changes Oct 8, 2024
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

LGTM

0xivanov
0xivanov previously approved these changes Oct 9, 2024
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

There are some merge conflicts, should not be very hard to fix.

rbarkerSL
rbarkerSL previously approved these changes Oct 10, 2024
@jjohannes
Copy link
Contributor Author

I fixed the conflicts. Now you need to press the button one more time @0xivanov @rbarkerSL.

Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rbarkerSL rbarkerSL left a comment

Choose a reason for hiding this comment

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

LGTM

@0xivanov 0xivanov merged commit 1fb077f into main Oct 15, 2024
11 checks passed
@0xivanov 0xivanov deleted the 1794-static-code-analysis branch October 15, 2024 13:56
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.

3 participants