CPP: Autoformat some untidy files#744
Conversation
| @@ -11,6 +11,7 @@ | |||
| import cpp | |||
|
|
|||
| // See also InitialisationNotRun.ql and GlobalUseBeforeInit.ql | |||
There was a problem hiding this comment.
If this was a multi-line /* .. */ comment it would get the extra newline after it. Generally the autoformatter expects toplevel comments to be of the form /* .. */ and in-predicate comments to be // ....
There was a problem hiding this comment.
I personally tend to use // for most comments, unless either (1) it's going to be many lines or (2) I want to finish it before the end of the line. Of course use of qldoc comments /** .. */ frequently overrides this preference.
There was a problem hiding this comment.
(in this case I believe the comments were originally written by someone else)
|
|
||
| // See also InitialisationNotRun.ql and GlobalUseBeforeInit.ql | ||
|
|
||
| // Holds if s defines variable v (conservative) |
There was a problem hiding this comment.
This ought to be qldoc, btw.
jbj
left a comment
There was a problem hiding this comment.
Nice improvement. @geoffw0 if you upgrade QL4E to the latest internal build and format these files again, it'll normalise parentheses. I don't know if you'll like that, but it should at least pull in the direction of consistency.
Auto-format some untidy CPP QL. This was mainly a learning exercise, I don't intend to make a deliberate attempt to continue this process with more files.
I had to make one manual correction (two comments that had been jammed together by the autoformatter), and there were some other files I tried this on that I wasn't satisfied with. I'm quite sure how much of this is due to glitches in the autoformatter, and how much is just stylistic differences I'm not used to yet.