spring-io / spring-javaformat

Apache License 2.0
797 stars 110 forks source link

"open" keyword (used in Java 9 modules) unrecognised by checkStyle #324

Closed EM-Creations closed 2 years ago

EM-Creations commented 2 years ago

Recently encountered a problem at work where when checkStyle tries to look at a module-info.java file, it will throw an exception regarding the open keyword, as if it doesn't recognise it as valid syntax, it's perfectly valid in a module-info.java file.

Exception: no viable alternative at input 'open'

module-info.java:

open module myproject.core {

}
wilkinsona commented 2 years ago

This will have to be addressed in Checkstyle (https://github.com/checkstyle/checkstyle/issues/8240). In the meantime, you should be able to configure it to ignore module-info.java files.

EM-Creations commented 2 years ago

Yeah that's what I'm doing for now thanks.