klauspost / asmfmt

Go Assembler Formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Options for formatting?

jpap opened this issue · comments

It would be very nice to be able to control (enable/disable) some of the formatting decisions though an option (even if available only via the asmfmt.Format() func).

In particular, I'd like to turn off the newline before each label. I have frequent comments on each line: with a newline inserted before each label, those comments aren't aligned across "blocks" (runs of assembly lines between labels).

Alternatively, to refrain from enabling customization of formatting: it would be nice to format the columns of each block within a TEXT function implementation across each label-block, so that all the instruction args and comments line up throughout the full function.

Hi! The main idea behind autoformatting is that the output is always the same. So I am reluctant to add options.

Do you have any examples I could take a look at?

Closing for now. Feel free to comment if you have more info