Ada code layout with gnatpp query
I am trying to use gnatpp to improve the layout of some ada code, however when reform开发者_运维问答atting procedure calls it is putting named parameters on the same line, rather than on separate lines as I prefer. The switches I am using are :
gnatpp $(INCLUDES) -A0 -aM -c0 -kL -nD -M128 -rf test.adb
I understand the -A0 should turn off all alignment issues...
Any idea how I am misreading them ?
I think the language in the alignment options may be confusing you a little.
The docs for the alignment options say:
Programs can be easier to read if certain constructs are vertically aligned. By default all alignments are set ON. Through the -A0 switch you may reset the default to OFF, and then use one or more of the other -An switches to activate alignment for specific constructs.
-A0 Set all alignments to OFF
The thing you have to realise here is that the text is trying to describe what these switches are doing to gnatpp, not to your own source code.
So what you are doing by setting -A0
is not "turning off all alignment issues" in your source code, but rather you are disabling all the code in gnatpp that would otherwise be looking at and fixing up your source code's alignment.
-A0
is effectively you telling gnatpp "please don't touch the alignment of my source code. I like it just the way it is."
Take that -A0
out of there, and see if you like the result better.
精彩评论