-
Notifications
You must be signed in to change notification settings - Fork 1
Rebase google v1 16 0 #29
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows building the Java > 11 logic in google-java-format into the jar regardless of what language level is configured for the entire build, and then dynamically enabling it when running on a new enough JDK, while remaining compatible with earlier JDK versions. PiperOrigin-RevId: 490074589
So that its `@Nullable` annotation is treated as a type-use annotation and formatted accordingly. See jspecify/jspecify#260. Fixes #869 COPYBARA_INTEGRATE_REVIEW=google/google-java-format#869 from PicnicSupermarket:improvement/support-new-jpecify-package-name 7a0dc20b5cddc4d560b2be25441b1ab26c3229c2 PiperOrigin-RevId: 495701635
PiperOrigin-RevId: 500180559
This brings us in line with the Unix standard of returning non-zero for a failed command: https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html Also, this will allow any callers (like google-java-format-diff.py) to respond appropriately. [A change](http://r.android.com/2257232) needed to be reverted because `google-java-format-diff.py` was failing silently, so the author wasn't aware that their change caused a pre-upload hook to stop working. Fixes #848 COPYBARA_INTEGRATE_REVIEW=google/google-java-format#848 from abstractlyZach:return_nonzero 06b2d3671d77c406be9b6d982321b17b920826df PiperOrigin-RevId: 502399096
I've signed the CLA. Fixes #847 COPYBARA_INTEGRATE_REVIEW=google/google-java-format#847 from stiemannkj1:fix-846-mem-thread-leak 0ca1e9bf9c8cf877509ac39cc50707d0ade7d71c PiperOrigin-RevId: 507026969
PiperOrigin-RevId: 509606924
See investigation in b/269345183 PiperOrigin-RevId: 509647966
This is currently the only non-whitespace change made as part of the core formatting logic. This is a requirement for updating the IntelliJ plugin to use the new supported plugin API. PiperOrigin-RevId: 512153706
openjdk/jdk@a917fb3 Fixes: google/google-java-format#898 PiperOrigin-RevId: 512759236
I'm going to add tests next, but with this weird file structure I've been using, there's no good place to put them. The only content changes here are in build.gradle. PiperOrigin-RevId: 512914783
Also support optimizing imports, using the ImportOptimizer API. PiperOrigin-RevId: 513562756
PiperOrigin-RevId: 513589436
…Activity. PiperOrigin-RevId: 513811140
Pop up this warning once per-project per-launch, only when the Formatter is enabled (or at startup if the formatter is already enabled in the project). PiperOrigin-RevId: 513822794
I moved the description out of the Gradle config and into the XML. (It was just in the gradle so we could add the gjf version number, but that seems unnecessary since I changed the versioning so that the plugin version matches the gjf version.) I also updated the IntelliJ Gradle plugin to 1.13.1 because plugin publishing is broken in 1.13.0. PiperOrigin-RevId: 513888985
I don't really understand _why_ this works. I'm able to (easily) reproduce the problem by not including the `=` in my `idea64.options` file. But then if I copy/paste the command line out of `ps`, it works fine. And since it's easy enough to change this, I'm inclined to just do that? Fixes #908. PiperOrigin-RevId: 514440074
Previously, blank lines could only be emitted before comments if they were there in the input. This was irrespective of BlankLineWanted.YES hints in the OpBuilder. These hints are already being set by some paths in GJF, so now that they're respected, blank lines will be added to some existing files. Eval in unknown commit PiperOrigin-RevId: 514817708
PiperOrigin-RevId: 515682100
… use gjf. Right now if your IDE isn't set up properly and you have gjf enabled in a project, you get a single warning. Any uses of the code formatter after that will instead use the built-in formatter. This is confusing to people who don't notice the notification. They think gjf is formatting their code strangely. Instead, let's warn on every single invocation of the formatter until they either fix the configuration issue or disable gjf in the project. Fixes #914 #919. PiperOrigin-RevId: 515722447
I have a feeling this is causing a lot of the issues people are seeing where it's constantly trying to reformat and failing because of syntax errors. Hopefully this will make it only try to reformat when a user specifically requests it. PiperOrigin-RevId: 521657519
shrutimitr-salling
approved these changes
Apr 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.