You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several spotless check actually use google-java-format under the hoods. When those checks are run from a JDK 17 environment but files are actually targeting Java 8 or Java 11, and also contains some reserved identifiers like yield, those checks would fail because files cannot be parsed (not because they are not conformant).
In general checks should use the version of the language used to compile those files, not the one used to run the plugin, so adding an option to either detect the version or allow the user to specify it would solve the issue.
The text was updated successfully, but these errors were encountered:
As it turns out, it seems google-java-format itself does not provide such an option. I created a ticket specifically for this project: google/google-java-format#975
Several spotless check actually use
google-java-format
under the hoods. When those checks are run from a JDK 17 environment but files are actually targeting Java 8 or Java 11, and also contains some reserved identifiers likeyield
, those checks would fail because files cannot be parsed (not because they are not conformant).In general checks should use the version of the language used to compile those files, not the one used to run the plugin, so adding an option to either detect the version or allow the user to specify it would solve the issue.
The text was updated successfully, but these errors were encountered: