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

Integrate Error Prone for static code analysis #1395

Merged
merged 6 commits into from
May 5, 2023

Conversation

ViToni
Copy link
Contributor

@ViToni ViToni commented Apr 25, 2023

Error Prone provides compile time static code analysis.
It requires at least JDK 11 since it makes use of some compiler hooks which are only available starting with JDK 11.
The setup allows usage of a JDK up to version 15 (version 16 and higher require addtional configuration).

This change does NOT change the default compilation source and target.
To avoid any interference between code analysis and production code, there is a special profile enabling code analysis.

This profile can either be selected explicitly:

mvn -P error-prone-check clean compile

or implicitly by injecting a JDK in the version range [11,16)

JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home mvn clean compile

@ViToni
Copy link
Contributor Author

ViToni commented Apr 25, 2023

Ideally this check would be executed in a pipeline, but I'm not firm with GitHub actions and the code analysis would require configuration of another JDK.

@ViToni
Copy link
Contributor Author

ViToni commented May 4, 2023

@cdjackson Would you mind giving it a look.

@cdjackson cdjackson merged commit d9b50aa into zsmartsystems:master May 5, 2023
@cdjackson
Copy link
Member

Thanks @ViToni - looks good.

ViToni added a commit to ViToni/com.zsmartsystems.zigbee that referenced this pull request May 26, 2023
* Add ErrorProne integration

* Fix endless recursion due to missing delegation

* Fix wrong generic type on Comparable for ZigBeeGroup

* Fix wrong computation of hasCode for ZToolAddress64

* Fix wrong key being used for SynchronousCommandListener lookup

* Make formatting of Integer explicit
@ViToni ViToni deleted the feature/integrate_errorprone branch June 15, 2023 15:11
charbopassman pushed a commit to passmanSA/com.zsmartsystems.zigbee that referenced this pull request Jul 25, 2024
* Add ErrorProne integration

* Fix endless recursion due to missing delegation

* Fix wrong generic type on Comparable for ZigBeeGroup

* Fix wrong computation of hasCode for ZToolAddress64

* Fix wrong key being used for SynchronousCommandListener lookup

* Make formatting of Integer explicit
charbopassman pushed a commit to passmanSA/com.zsmartsystems.zigbee that referenced this pull request Jul 25, 2024
* Add ErrorProne integration

* Fix endless recursion due to missing delegation

* Fix wrong generic type on Comparable for ZigBeeGroup

* Fix wrong computation of hasCode for ZToolAddress64

* Fix wrong key being used for SynchronousCommandListener lookup

* Make formatting of Integer explicit
charbopassman pushed a commit to passmanSA/com.zsmartsystems.zigbee that referenced this pull request Dec 2, 2024
* Add ErrorProne integration

* Fix endless recursion due to missing delegation

* Fix wrong generic type on Comparable for ZigBeeGroup

* Fix wrong computation of hasCode for ZToolAddress64

* Fix wrong key being used for SynchronousCommandListener lookup

* Make formatting of Integer explicit
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