-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JEP 330 "shebang" headers #1214
Comments
FYI both Visual Studio Code and IntelliJ IDEA don't really like this syntax either (VSC, which uses JDT, just says "Syntax error on tokens, delete these tokens", and IJ says "Shebang mechanism in .java files is not permitted" (which surprised me given that this jetbrains.com post says it should work; but possibly I just couldn't figure out the right language level support Settings). But be that (current Editor support) as it may, per JEP 330 it's still valid Java syntax, so (in a perfect world... 🍭 ) google-java-format should not choke on it. |
FTR This is on v1.25.1, which is the 2nd most recent release today; looking at the 1.25.2 Release Notes, I have no reason to believe that this (just) got fixed. |
I'm not sure that's right, as I understand it JEP 330 is exclusively a Java launcher (
|
I'm toying (more "for fun") with https://openjdk.org/jeps/330 in enola-dev/enola#971:
I am using https://www.jbang.dev, but this issue doesn't really have anything to do with that (JBang) per se:
For the following content of
learnenola.java
which (at least as I understand it) is technically "valid standard Java syntax" per JEP 330:google-java-format
currently fails like this:See also https://www.jbang.dev/documentation/guide/latest/faq.html for some further background if needed.
PS: I've opened another issue #1215 for something that's a separate problem related to "special" (non-shebang)
///
comments.The text was updated successfully, but these errors were encountered: