Title: Comments starting with /// should not be reformatted as // / · Issue #1215 · google/google-java-format · GitHub
Open Graph Title: Comments starting with /// should not be reformatted as // / · Issue #1215 · google/google-java-format
X Title: Comments starting with /// should not be reformatted as // / · Issue #1215 · google/google-java-format
Description: I'm toying (more "for fun") with https://openjdk.org/jeps/330 something in enola-dev/enola#971: I am using https://www.jbang.dev, but Im not sure if this issue specific to that tool or really could be considered more generically: As per ...
Open Graph Description: I'm toying (more "for fun") with https://openjdk.org/jeps/330 something in enola-dev/enola#971: I am using https://www.jbang.dev, but Im not sure if this issue specific to that tool or really could...
X Description: I'm toying (more "for fun") with https://openjdk.org/jeps/330 something in enola-dev/enola#971: I am using https://www.jbang.dev, but Im not sure if this issue specific to that tool o...
Opengraph URL: https://github.com/google/google-java-format/issues/1215
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Comments starting with /// should not be reformatted as // /","articleBody":"I'm toying (more \"for fun\") with ~~https://openjdk.org/jeps/330~~ something in https://github.com/enola-dev/enola/issues/971:\n\nI am using https://www.jbang.dev, but Im not sure if this issue specific to that tool or really could be considered more generically:\n\nAs per https://www.jbang.dev/documentation/guide/latest/faq.html, and (apparently) partly inspired by https://golangcookbook.com/chapters/running/shebang/ in Go, given that JEP 330 \"shebang\" headers are still a bit of a PITA (see also related #1214), I'm starting a Java file with `///usr/bin/env jbang \"$0\" \"$@\" ; exit $?`\n\ngoogle-java-format reformats `///usr/bin/env jbang \"$0\" \"$@\" ; exit $?` to `/// usr/bin/env jbang \"$0\" \"$@\" ; exit $?` (note the added space), which breaks the magic.\n\nUnfortunately, as per https://github.com/google/google-java-format/wiki/FAQ#why-cant-i-use-magic-comments-to-disable-formatting-for-certain-sections-of-code, it does not seem to be easily possible to suppress formatting that first line.\n\nThe only choice seems to be not to use google-java-format for such \"script\" like Java files (shame), or not to use that header in them.","author":{"url":"https://github.com/vorburger","@type":"Person","name":"vorburger"},"datePublished":"2024-12-29T16:55:45Z","url":"https://github.com/google/google-java-format/issues/1215"}
| 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:bab9496a-2951-606e-b06d-0a40432209b0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B606:23880A:2681CC:344ADA:6AFBAFE4 |
| html-safe-nonce | c0016c357d518ba8514b0ac0b27b7d5b5bc3a0527e73463b47caf77e11bda7df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjA2OjIzODgwQToyNjgxQ0M6MzQ0QURBOjZBRkJBRkU0IiwidmlzaXRvcl9pZCI6IjYyNTMyOTI3Nzc4Mjg0OTUzMzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0aa46057aa9c7a29b28aaa0d3da51d7f6eef84b3b32d5f6f34682087a1f862db |
| hovercard-subject-tag | issue:2762328481 |
| 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/1215/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec1af7b5ecf9d10f27e936206f24e67fec670bb405f358979bb775ef1b2d3a44/google/google-java-format/issues/1215 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec1af7b5ecf9d10f27e936206f24e67fec670bb405f358979bb775ef1b2d3a44/google/google-java-format/issues/1215 |
| og:image:alt | I'm toying (more "for fun") with https://openjdk.org/jeps/330 something in enola-dev/enola#971: I am using https://www.jbang.dev, but Im not sure if this issue specific to that tool or really could... |
| 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 | e25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55 |
| 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 | 08c8f17f9d27054a108b8b6254e405de0151f660 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width