Files that import struct NIO.ByteBuffer but never name it:
for f in $(git grep -l '^import struct NIO.ByteBuffer$' -- Sources Tests); do
grep -v '^import struct NIO.ByteBuffer$' $f | grep -q ByteBuffer || echo $f
done
Each loses the import line, and a now-doubled blank line.
Add EncodeBuffer.writeByte / writeDecimal / writeLiteralHeader /
writeRedactedByteCount and use them for every numeric interpolation
in encoders. writeString("…\(x)…") sites become separate writeString
calls; quote-wrapped ones ("\"\(x)\"") stay. writeMailboxStatus
writes each attribute directly instead of building (String, String)
pairs. Output unchanged for valid values; avoids String formatting and
allocation. Invalid (negative) FullDate/FullTime fields now pad after
the sign: -0005, not 00-5.
writeLiteralHeader takes LiteralSynchronization (`{n+}`) and
LiteralKind (`~{n}`) enums.
Resolves#556
We've talked quite a bit offline, and decided that for now @_spi is the way to go, as it avoids build system issues. The goal is to remove the number of underscored public types and fields.
motivation: use standard format across all of our projects
changes:
* add .swiftformat settings based on what we use in other projects
* validate format in the sanity script
* format