twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.16k stars 2.06k forks source link

Add a clang-format file approximating the c style guide #601

Closed TysonAndre closed 3 years ago

TysonAndre commented 3 years ago

This detects some inconsistent uses of indentation and inconsistent space after casts, but has a lot more false positives.

https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting may be of use for saving time for contributors reformatting new patches

Problem

Make it easier to automatically detect and automatically fix violations of the style guide in new patches

Solution

Add an example .clang-format.example file for use with clang-format