diffplug / diffplug/spotless

Use java source version for Google Format checks

Open
#1,841 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.