Skip to content

Commit

Permalink
GH-44528: [Dev] Introduce a new feature: specific language reformatti…
Browse files Browse the repository at this point in the history
…ng (#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 <hiroysato@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
hiroyuki-sato authored Oct 25, 2024
1 parent 9287bd7 commit 802a846
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ repos:
hooks:
- id: clang-format
name: C++ Format
alias: cpp-format
types_or:
- c++
# - json
Expand Down Expand Up @@ -103,20 +104,23 @@ 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
rev: v14.0.6
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
rev: v14.0.6
hooks:
- id: clang-format
name: Python (C++) Format
alias: python-cpp-format
files: >-
^python/pyarrow/src/
exclude: >-
Expand All @@ -130,6 +134,7 @@ repos:
hooks:
- id: clang-format
name: R (C++) Format
alias: r-cpp-format
files: >-
^r/src/
exclude: >-
Expand Down

0 comments on commit 802a846

Please sign in to comment.