acemod / ACE-Anvil

Open-source realism mod for Arma Reforger
https://anvil.acemod.org
GNU General Public License v2.0
22 stars 7 forks source link

[experiment] Run clang-format on codebase #46

Open PabstMirror opened 1 month ago

PabstMirror commented 1 month ago

Please look at commit https://github.com/acemod/ACE-Anvil/commit/a97a3e0888a63532044c20470d6f6628b0190320 too see the real changes (ignoring tab replacement)

enf seems very close to csharp so clang is handling it pretty well We can change style to whatever we want ({ on same line is more ace3 style)

Kexanone commented 1 month ago

Great for keeping things consistent, but please go back to Allman style, since that's what should be used based on BI conventions. Also use tabs instead of spaces for indentation, since the WB script editor can only handle the former properly.

Drofseh commented 1 month ago

I really hate the Allman braces and don't see a real need to follow that convention as long as the game loads properly.

Kexanone commented 1 month ago

Both Allman and K&R are reasonable styles and widely used in the world of programming. You pick whatever makes sense in a particular language and project regardless of personal preferences. And this is definitely Allman in Enfusion. In practice, you will have to go through a lot of BI code to find the suitable entry points or parts you want to modify. Once you do, you make a copy of the file you want to mod. Changing the indentation style would just be plain annoying.