-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Dev] Use pre-commit-hook instead of "archery lint" for all lints #40417
Copy link
Copy link
Closed
6 / 66 of 6 issues completedClosed
6 / 66 of 6 issues completed
Copy link
Description
Describe the enhancement requested
We use archery lint ... to run linters. It's convenient because we don't need to know linters details but we need to install archery[lint] and we need to write Python code to add a new linter. They're a bit annoying.
How about using pre-commit https://pre-commit.com/ for all linters? If we use pre-commit:
- We don't need to write Python code for new linter and changing linter behavior (We need to write YAML instead)
- C++: We don't need to install
clang-format-14separately (pre-commit can do it automatically) - C++: We don't need to run CMake to run
clang-format-14 - We can get easy to read lint failure messages (
archery docker run ubuntu-lintoutputs many unrelated messages)
Note that we already have some pre-commit configuration: https://github.com/apache/arrow/blob/main/.pre-commit-config.yaml
Sub issues:
- [CI][Dev] Run pre-commit #40448
- [Dev] Use pre-commit for cmake-format #40544
- [Dev][C++][Python][R] Use pre-commit for clang-format #40586
- [MATLAB] Enable
clang-formatin thematlab/subfolder. #35941 - [CI][C++][Dev] Add cpplint to pre-commit #43979
Component(s)
Developer Tools
Reactions are currently unavailable