apt-sim/AdePT

Coding Standards and Style

Closed this issue · 5 comments

Let's use this issue to discuss about and decide on a set of coding style, standards, and other guidelines.

A new project offers us an opportunity to adopt more modern coding style than what is used by ROOT/Geant4.
I suggest we look into existing widely used standards (including ROOT/Geant4), and pick something based on them to follow.

References:

I think the style question is already done, we have a .clang-format (see #10 and #12). Is there anything in particular about the semantic aspect (like naming of attributes) that you'd like to discuss?

Yes, clang-format only tells you how to format your code, and I agree that having a tool do it and just accept its output as the right way to format is best. However that does not cover naming, and many other things from the links above that are a matter of style.

There are further options in clang-tidy. For naming you have e.g.: https://clang.llvm.org/extra/clang-tidy/checks/readability-identifier-naming.html

Thanks, @bernhardmgruber. Looks like a lot of work to configure, but should do the job well once that's done.

Using clang format for the moment.