google / gson

A Java serialization/deserialization library to convert Java Objects into JSON and back
Apache License 2.0
23.34k stars 4.28k forks source link

Enable additional Error Prone checks & fix violations #2561

Closed Marcono1234 closed 9 months ago

Marcono1234 commented 10 months ago

Purpose

Enable additional Error Prone checks which are disabled by default

Description

Some of them also enforce additional Google Java Format requirements which are not handled by google-java-format, such as disallowing wildcard imports.

Not all experimental checks have been listed because some are not applicable, such as Dependency Injection framework checks, or checks related to Guava's immutable collections (since Gson's main code does not have a dependency on Guava).

Other checks have been omitted because they are probably not relevant (this was a subjective choice), or would require larger refactoring or would flag issues with the public API, which cannot be changed easily.


Open questions:

Checklist