Keep the exponent digit when formatting floats with a zero exponent (#1543) The float rewrite strips leading zeros and plus signs from the exponent, so a float whose exponent is zero loses it entirely: `x = 1.5e0`, `1.5e+0` and `1.0E00` are written back as `1.5e` and `1.0e`, which is no longer valid Starlark. I keep a single `0` when the exponent has digits but all of them are zeros. A float with no exponent digits at all (`1.5e`) was already invalid, and is now left as written instead of being rewritten. The new cases in `build/testdata/003` cover `1.5e0`, `1.5e+0`, `1.0E00` and `.5e+000`. I also compared the old and new output over a few hundred combinations of mantissa, `e`/`E`, sign and exponent: only zero exponents and the digitless ones changed.
This repository contains developer tools for working with Google's bazel buildtool.
See instructions in each tool's directory.