Title: Support JEP 330 "shebang" headers · Issue #1214 · google/google-java-format · GitHub
Open Graph Title: Support JEP 330 "shebang" headers · Issue #1214 · google/google-java-format
X Title: Support JEP 330 "shebang" headers · Issue #1214 · google/google-java-format
Description: 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.j...
Open Graph Description: 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: F...
X Description: 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...
Opengraph URL: https://github.com/google/google-java-format/issues/1214
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support JEP 330 \"shebang\" headers","articleBody":"I'm toying (more \"for fun\") with https://openjdk.org/jeps/330 in https://github.com/enola-dev/enola/issues/971:\n\nI am using https://www.jbang.dev, but this issue doesn't really have anything to do with that (JBang) per se:\n\nFor the following content of `learnenola.java` which (at least as I understand it) is technically _\"valid standard Java syntax\"_ per JEP 330:\n\n```java\n#!/usr/bin/env jbang\n\nimport static java.lang.System.out;\n\npublic class learnenola {\n\n public static void main(String... args) {\n out.println(\"Hello World\");\n }\n}\n```\n\n`google-java-format` currently fails like this:\n\n```sh\n$ ./google-java-format_linux-x86-64 --aosp --lines 1:11 learnenola.java\n\n\u003cstdin>:1:1: error: illegal character: '#'\n#!/usr/bin/env jbang\n^\n\u003cstdin>:1:3: error: class, interface, enum, or record expected\n#!/usr/bin/env jbang\n ^\n Command failed: ./google-java-format_linux-x86-64 --aosp --lines 1:13 -\n\u003cstdin>:1:1: error: illegal character: '#'\n#!/usr/bin/env jbang\n^\n\u003cstdin>:1:3: error: class, interface, enum, or record expected\n#!/usr/bin/env jbang\n ^\n```\n\nSee also https://www.jbang.dev/documentation/guide/latest/faq.html for some further background if needed.\n\nPS: I've opened another issue #1215 for something that's a separate problem related to \"special\" (non-shebang) `///` comments.","author":{"url":"https://github.com/vorburger","@type":"Person","name":"vorburger"},"datePublished":"2024-12-29T16:39:44Z","url":"https://github.com/google/google-java-format/issues/1214"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:25c3bee0-5ee8-c41f-74ff-7ad56b4f0838 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FE8:83E6C:2F9BCC:4068B4:6AFBB34B |
| html-safe-nonce | b03318ebfcbf8d3bbeebd929220e1d313b37b7dceeac856d57d62e780471c79a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkU4OjgzRTZDOjJGOUJDQzo0MDY4QjQ6NkFGQkIzNEIiLCJ2aXNpdG9yX2lkIjoiNTc2MTk0MDE1MjU2OTgwMzU5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 05a78b174857e8c69aad37639cc57f9845c06a710e7be331d2550402b9ba45f4 |
| hovercard-subject-tag | issue:2762322934 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/google-java-format/1214/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29118f6f7ccc92cd7ee532aecf3e602bc3099191860a297b5fa615535ef12a99/google/google-java-format/issues/1214 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29118f6f7ccc92cd7ee532aecf3e602bc3099191860a297b5fa615535ef12a99/google/google-java-format/issues/1214 |
| og:image:alt | 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: F... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vorburger |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/google/google-java-format git https://github.com/google/google-java-format.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 35448780 |
| octolytics-dimension-repository_nwo | google/google-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35448780 |
| octolytics-dimension-repository_network_root_nwo | google/google-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width