Cemu icon indicating copy to clipboard operation
Cemu copied to clipboard

Consistent coding style

Open pascalpuffke opened this issue 3 years ago • 2 comments

I would highly recommend that we add some sort of documentation on how to format code.

The best solution for this IMO would be a .clang-format file. That way the clang-format tool can format everything in a consistent style.

These are pretty easy to set up, and IDEs like CLion support them out of the box for automatic, on file save / hotkey formatting. A minimal .clang-format file only needs two lines if Exzap is okay with using a predefined style. (Just don't pick GNU.)

Here's an example of good documentation regarding this topic, and here's a sample .clang-format.

pascalpuffke avatar Aug 24 '22 23:08 pascalpuffke

+1 for a .clang-format It would make Pull-Request reviews and contributions that much easier when a whole classification of style-reviews can be ruled out.

Wunkolo avatar Aug 25 '22 00:08 Wunkolo

I was thinking about adding clang-format, I'll open a PR soon.

Zopolis4 avatar Aug 25 '22 03:08 Zopolis4