apache / orc

Apache ORC - the smallest, fastest columnar storage for Hadoop workloads
https://orc.apache.org/
Apache License 2.0
671 stars 477 forks source link

ORC-1658: [C++] Unify identifiers naming style. #1855

Closed ffacs closed 3 months ago

ffacs commented 4 months ago

What changes were proposed in this pull request?

  1. Add run_clang_tidy.py which comes from LLVM and clang-tidy configuration file.
  2. Use clang-tidy to format the C++ code.

Why are the changes needed?

To close https://github.com/apache/orc/issues/1845

How was this patch tested?

UT passed

Was this patch authored or co-authored using generative AI tooling?

NO

ffacs commented 4 months ago

This patch I`ve done the following things:

  1. run clang-tidy cd builf && python3 ../run_clang_tidy.py -p . -fix
  2. format codes
    git ls-files --exclude-standard | grep ".*\(cc\|hh\)$" | xargs clang-format -i -style=file --dump-config 
  3. add licence to run_clang_tidy.py and clang-tidy config file

Currently the patch can be built on my macOS(arm Apple clang version 15.0.0) and ubuntu(x64 clang-18) and passes UTs with mkdir build -p && cd build && cmake .. -DBUILD_JAVA=OFF -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_EXPORT_COMPILE_COMMANDS=1 && make -j20 && make test .

ffacs commented 3 months ago

@dongjoon-hyun Hi, do you have any suggestions about this patch?

dongjoon-hyun commented 3 months ago

@dongjoon-hyun Hi, do you have any suggestions about this patch?

Although I've been monitoring this PR and discussion, there is no other objection for the AS-IS direction including backward compatibility consideration.

dongjoon-hyun commented 3 months ago

Thank you!