You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/31 08:31:27 UTC
[GitHub] [arrow] MarcoGorelli commented on a change in pull request #9045: Fixup pre-commit-config.yaml so that cmake format runs
MarcoGorelli commented on a change in pull request #9045:
URL: https://github.com/apache/arrow/pull/9045#discussion_r550428220
##########
File path: .pre-commit-config.yaml
##########
@@ -40,9 +40,10 @@ repos:
- id: cmake-format
name: CMake Format
language: python
- entry: bash -c "pip install cmake-format && python run-cmake-format.py --check"
- entry: echo
- files: ^(.*/CMakeLists.txt|.*.cmake)$
+ entry: cmake-format --in-place --autosort=false
Review comment:
Hi @kou
It does the same thing. If you do it this way, then `pre-commit` will figure out which files to run it on, and it'll be much, much faster:
```
$ time pre-commit run cmake-format --all-files
[WARNING] Unexpected key(s) present on git://github.com/pre-commit/pre-commit-hooks: sha
CMake Format.............................................................Passed
real 0m4.472s
user 0m18.011s
sys 0m0.259s
$ time python run-cmake-format.py
WARNING config_util.py:307: The following configuration options were ignored:
max_subargs_per_line
real 0m10.620s
user 0m10.594s
sys 0m0.017s
```
As far as I can tell, then only configuration in the wrapper is `--in-place --autosort=false` - have I missed anything else?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org