Skip to content

Apply unified code style / formatting

In EOSCTA docs we have the guidelines to CTA Coding Conventions. However them do not cover ALL code styles. Also it would good to have a tool that applies the formatting automatically + a common config file in CTA repo so all developers use the same style. We can have several configs - one for each favorite IDE.

It would decrease the number of merge conflicts when rebasing dev branches against master.

Internet suggests the following formatters:

If you know another tools, please add and describe them in the comments.

TODO

  • Create container to run recent version of clang-format
  • Create gitlab CI job for clang-format check
  • Create git pre-commit hook
  • Format all files
  • Ignore reformatting commits with .git-blame-ignore-revs
  • Make CI job mandatory
  • Update development docs
Edited by Volodymyr Yurchenko