Commit graph

1 commit

Author SHA1 Message Date
James Benton
62e4862037 Add a .clang-format which can be used as a guideline when formatting code.
This should not be blindly followed, as I have encounted some of the
following problems with it:

Breaks enum value alignment, e.g.:
ENUM_VALUE(x,       1)
ENUM_VALUE(yyyy,    1)

Becomes
ENUM_VALUE(x, 1)
ENUM_VALUE(yyyy, 1)

Due to needing to use Column Limit: 0 to stop it doing riduculously
inconsistent behaviour due to column limit clashing with the other rules,
it will sometimes join broken lines up to form big ass lines. This should
be ignored and uses should try keep to 80 width with 100 as hard limit.

It forces values to be on a new line in initialised arrays, this might not
be desired.
2018-10-11 22:21:21 +01:00