codes-org / codes

The Co-Design of Exascale Storage Architectures (CODES) simulation framework builds upon the ROSS parallel discrete event simulation engine to provide high-performance simulation utilities and models for building scalable distributed systems simulations
Other
40 stars 16 forks source link

reformat code, put together formatting guidelines (Imported #120) #120

Closed nmcglo closed 4 years ago

nmcglo commented 8 years ago

Original Issue Author: Jonathan Jenkins Original Issue ID: 120 Original Issue URL: https://xgitlab.cels.anl.gov/codes/codes/issues/120


Use uncrustify, clang-format, or other goodies to format the code, some of which has gotten hairy over time.

nmcglo commented 8 years ago

Jonathan Jenkins:

I'm not satisfied with what I was able to come up with so let's not do this for 0.4.0. Most is fine, but I haven't seen a good treatment of "short" function declarations e.g. int foo(int a, int b); vs. long ones e.g. const struct my_really_long_struct * foo (const struct my_really_long_struct * a, const struct my_really_long_struct * b);. Preferably there shouldn't be line separators for short functions, but there should be (one line per parameter) for long ones.

nmcglo commented 4 years ago

This is very subjective. While there should be a code styling guideline, I don't see this effectively being imposed and should really just be enforced within reason by whoever is doing code reviews during merge request processing.