I didn't see a thread on this so... here is the .clang-format I have been using (attached) on the borg code just to make it format similar to the rest of the code. If there are modifications I should make or if someone has already made a better one, lmk.
clang-format
Collapse
X
-
Builds using configure on macOS use the "-Wnewline-eof" warning flag by default and that flags many of the borg files as missing a newline at the end of the file. There's no similar messages for the rest of the Angband source code. Is specifying a newline at the end of the file something that can be done with clang-format? -
Builds using configure on macOS use the "-Wnewline-eof" warning flag by default and that flags many of the borg files as missing a newline at the end of the file. There's no similar messages for the rest of the Angband source code. Is specifying a newline at the end of the file something that can be done with clang-format?
InsertNewlineAtEOF: true
I will double check and add that if it isn't there and update the borg files.
The biggest problem I have found with auto-formatting using this is that it messes up arrays in the
static const int adj_mag_mana[STAT_RANGE] = {
0 /* 3 */,
10 /* 4 */,
20 /* 5 */,
30 /* 6 */,
40 /* 7 */,
50 /* 8 */,
...
formatting so I have to manually exclude those when formatting the file.Comment
Comment