Azure / autorest.java

Extension for AutoRest (https://github.com/Azure/autorest) that generates Java code
MIT License
33 stars 82 forks source link

Remove setting to disable formatting #2652

Closed alzimmermsft closed 6 months ago

alzimmermsft commented 6 months ago

Removes the setting that disables code formatting as generated code should always be formatted. This is likely a hold over when code formatting was rapidly changing to prevent too much noise.

Additionally, there is a lot of cleanup of code patterns to reduce Pattern usage and String.format (when reasonable) to increase performance. And reduction of collecting streams to List when an Iterator is sufficient.

weidongxu-microsoft commented 6 months ago

This flag was mainly for skip formatting, when generated code cannot pass formatting (sometimes due to incorrect option, e.g. invalid namespace; sometimes due to bug in codegen).