awesome-annotation-processing
Error Prone
awesome-annotation-processing | Error Prone | |
---|---|---|
4 | 16 | |
445 | 6,724 | |
- | 0.4% | |
0.0 | 9.4 | |
23 days ago | 6 days ago | |
Java | ||
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
awesome-annotation-processing
-
Monkey-patching in Java
The documentation could be less sparse. I found the following Awesome Java Annotation Processing. Here's a simplified class diagram to get you started:
-
A Java library to add compile-time validation for any annotation
Nice! I suggest having it added to Gunnar's awesome annotation processing list
-
Is using Project Lombok actually an good idea?
Lombok is not Java. Unlike, say, Immutables, Auto and other annotation processors, it is not some supported add-on, but a piece of software that significantly modifies how the javac compiler works. It is essentially and technically a fork of javac, and, therefore a different language from Java.
- Is Lombok in danger of becoming incompatible with future JDK's?
Error Prone
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
error-prone is good for some extra static analysis.
-
How to use Java Records
A special kind of validation is enforcing that record fields are not null. (Un)fortunately, records do not have any special behavior regarding nullability. You can use tools like NullAway or Error Prone to prevent null in your code in general, or you can add checks to your records:
- Prusti: Static Analyzer for Rust
-
Why is `suspend` a language keyword, but @Composable and @Serializable are annotations
I am all in favour to more third side libraries adding functionalities, like Lombok, Manifold and error prone. As well as smaller projects like this shameless plug and what appears in this list
-
Picnic loves Error Prone: producing high-quality and consistent Java code
If only Google didn't suck when it came to Java9+ support... https://github.com/google/error-prone/issues/2649
-
What does the future hold for Project Amber?
I haven't used it. I use Google's ErrorProne + Lombok to prevent NPEs in java.
-
Plans for Compile-time Null Pointer Safety?
Take a look at NullAway, a plugin for Error Prone.
-
What I miss in Java, the perspective of a Kotlin developer
For some of this stuff, there are compiler extensions that allow extra type checking to be added e.g. Google Error-Prone: https://github.com/google/error-prone with stuff like: https://errorprone.info/bugpattern/ReturnMissingNullable.
Doesn't help you with third party libraries, but across an org applying that rule (and others!) typically ensures some consistency.
-
A guide on how to improve your coding skills with static code analysis.
How to build a static analysis plugin. Google has a framework for Java with a good tutorial.
- Error Prone 2.11.0 Released. Requires JDK11+
What are some alternatives?
record-builder - Record builder generator for Java records
Spotbugs - SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.
Lombok - Very spicy additions to the Java programming language.
SonarQube - Continuous Inspection
OpenJ9 - Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
PMD - An extensible multilanguage static code analyzer.
annotation-constraints
Checkstyle - Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.
equalsverifier - EqualsVerifier can be used in Java unit tests to verify whether the contract for the equals and hashCode methods is met.
FindBugs - The new home of the FindBugs project
twitter4s - An asynchronous non-blocking Scala client for both the Twitter Rest and Streaming API
infer - A static analyzer for Java, C, C++, and Objective-C