From 802a84693b21847fc48efa2b29e23e0058256eeb Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Fri, 25 Oct 2024 11:36:16 +0900 Subject: [PATCH] GH-44528: [Dev] Introduce a new feature: specific language reformatting (#44529) ### Rationale for this change This change implements GH-44528. `pre-commit run --color=always --all-files c-glib-cpp-format` Languages: * C++ (`cpp-format`) * c_glib(`c-glib-cpp-format`) * MATLAB(`matlab-cpp-format`) * Python (`python-cpp-format`) * R(`r-cpp-format`) ### What changes are included in this PR? Add aliases to the `clang-format` in the pre-commit configuration file. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #44528 Authored-by: Hiroyuki Sato Signed-off-by: Sutou Kouhei --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bee20369c017e..9f326f3175618 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,6 +63,7 @@ repos: hooks: - id: clang-format name: C++ Format + alias: cpp-format types_or: - c++ # - json @@ -103,6 +104,7 @@ repos: hooks: - id: clang-format name: C/GLib Format + alias: c-glib-cpp-format files: >- ^c_glib/ - repo: https://github.com/pre-commit/mirrors-clang-format @@ -110,6 +112,7 @@ repos: hooks: - id: clang-format name: MATLAB (C++) Format + alias: matlab-cpp-format files: >- ^matlab/src/cpp/ - repo: https://github.com/pre-commit/mirrors-clang-format @@ -117,6 +120,7 @@ repos: hooks: - id: clang-format name: Python (C++) Format + alias: python-cpp-format files: >- ^python/pyarrow/src/ exclude: >- @@ -130,6 +134,7 @@ repos: hooks: - id: clang-format name: R (C++) Format + alias: r-cpp-format files: >- ^r/src/ exclude: >-