Liam Miller-Cushon

Results 183 comments of Liam Miller-Cushon

@lowasser's comment is now captured in [this FAQ entry](https://github.com/google/google-java-format/wiki/FAQ#why-cant-i-use-magic-comments-to-disable-formatting-for-certain-sections-of-code). This isn't something we have plans to revisit right now, but it's always helpful to see specific examples--if you have snippets...

I've been looking at supporting Java language features up to 14 recently, including text blocks, but hadn't thought through this yet. It makes sense that we don't want to make...

> Do you suggest the formatter refuses to format such files? No, it generally tries to accept anything that's syntactically valid and produce semantically equivalent output, I was just curious....

The CLI has a separate pass that reflows long strings literals (corresponding to `--skip-reflowing-long-strings`): https://github.com/google/google-java-format/blob/5104d0b27888f3bfab7113f5606374cda5632102/core/src/main/java/com/google/googlejavaformat/java/FormatFileCallable.java#L48 The IntelliJ plugin currently just runs the core formatter logic, not the string reflowing part.

Do you have an example of a license header with >100 column lines that get wrapped by the formatter?

In that example it's removing trailing whitespace from the lines before and after the line containing `http://www.apache.org/licenses/LICENSE-2.0`. The other behaviour you describe (adding `` tags and reflowing lines) would only...

Thanks for raising this again. We still want to do something here, it's just been on the back burner. We still don't have a huge number of type annotations, so...

> A configuration file would permit the user to notify GJF about the new type annotation. If the list of type annotations is only baked-in, then the user will have...

I have finally made some time to investigate having the formatter recognize type annotations and format them differently, e.g. preferring ```java @Deprecated @Nullable Object foo() {} ``` I don't see...

It isn't a priority right now, but I think we'd take a PR that added a system property that specified a file containing additional type annotation qualified names to consider...