Skip to content
Snippets Groups Projects
Commit 42a0adb7 authored by Tor Norbye's avatar Tor Norbye
Browse files

Add type printer to properly handle Kotlin style null syntax

This CL updates the handling of Kotlin-style null syntax (used
in format v3). It now does a much more accurate job formatting
types from Java syntax (and Java type use annotation syntax)
into Kotlin-style nullness syntax. This cannot be done with
simple things like replacing @Nullable with ? since the place
for the annotations in the type expression is not the same as
where the nullness suffix goes.

This CL also adds --format=latest as an alias for --format=v3
and --format=recommended as an alias for --format=v2.
(The alias values will change over time as the formats and
recommendations evolve.)

Bug: 123415058
Test: Many new unit tests
Change-Id: I6622041f0966b99157db4fe60d534a55e658bd10
parent c01068d0
No related branches found
No related tags found
No related merge requests found
Showing
with 1268 additions and 245 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment