Jens Geyer created THRIFT-6219:
----------------------------------

             Summary: C++ library sources do not match the checked-in 
.clang-format, and nothing checks it
                 Key: THRIFT-6219
                 URL: https://issues.apache.org/jira/browse/THRIFT-6219
             Project: Thrift
          Issue Type: Improvement
          Components: C++ - Library, Build Process
            Reporter: Jens Geyer


Running clang-format 14 (Ubuntu 22.04) with {{--style=file}} over 
{{lib/cpp/src}} on master changes 150 of 156 files, 5010 lines in all. 
{{.clang-format}} is shipped (it is in {{EXTRA_DIST}}), but neither {{make 
style}} -- which runs codespell only -- nor any CI workflow runs clang-format.

The cost falls on contributors: formatting a file you touched rewrites 
unrelated parts of it ({{THttpServer.cpp}} 41 lines, {{TBufferTransports.cpp}} 
35, {{TSocket.cpp}} 73), so a change either skips formatting or carries a large 
unrelated diff.

Options: reformat {{lib/cpp}} once in a dedicated commit and check it in CI 
from then on; adjust {{.clang-format}} to the code as it is; or remove it. Any 
of them needs a pinned clang-format version, since versions differ in their 
output.

_Drafted with AI assistance (Claude Opus 5); reviewed and filed by Jens Geyer._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to