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:
#!/usr/bin/env jbang
import static java.lang.System.out;
public class learnenola {
public static void main(String... args) {
out.println("Hello World");
}
}
google-java-format currently fails like this:
$ ./google-java-format_linux-x86-64 --aosp --lines 1:11 learnenola.java
<stdin>:1:1: error: illegal character: '#'
#!/usr/bin/env jbang
^
<stdin>:1:3: error: class, interface, enum, or record expected
#!/usr/bin/env jbang
^
Command failed: ./google-java-format_linux-x86-64 --aosp --lines 1:13 -
<stdin>:1:1: error: illegal character: '#'
#!/usr/bin/env jbang
^
<stdin>:1:3: error: class, interface, enum, or record expected
#!/usr/bin/env jbang
^
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.
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.javawhich (at least as I understand it) is technically "valid standard Java syntax" per JEP 330:google-java-formatcurrently 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.