unit icon indicating copy to clipboard operation
unit copied to clipboard

Add .clang-format file with Unit ruleset

Open javorszky opened this issue 4 months ago • 8 comments

This adds a .clang-format file that can be used with the clang-format tool to either reformat code locally, or automatically flag up code styling issues during a github action.

This PR's only aim right now is to have a conversation about the rulesets and come to a standard (ie ruleset in the clang-format file) that the entire team agrees on, so we can get to a point where we're not having conversations about code styling in future PRs.

This PR does not aim to wire it up to github actions yet.

Diffs of the codebase:

  • custom style (this .clang-format): https://github.com/nginx/unit/pull/1471
  • Chromium: https://github.com/nginx/unit/pull/1470
  • Microsoft: https://github.com/nginx/unit/pull/1472
  • LLVM: https://github.com/nginx/unit/pull/1473
  • GNU: https://github.com/nginx/unit/pull/1474

javorszky avatar Oct 23 '24 19:10 javorszky