我们的项目是通过 CMake 来管理的,所以可以在 CMake 中加入如下代码,让工程在初始化的时候自动去安装 clang-format、pre-commit,并自动执行 pre-commit install 将钩子安装到每个开发人员仓库的 .git/hooks 目录下。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 # Pre-commit hooks IF (NOT EXISTS ${...
add pre-commit hook (ran on all files in API v1 #94 after clean-up) add clang-format to CI
A SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on Quatro and Nano-GICP - Clang-format · engcang/FAST-LIO-SAM-QN@f1623fc
我有以下预提交挂钩:回购协议: - 仓库:https://github.com/pre-commit/mirrors-clang-format 修订版:v14.0.6 挂钩: - id:clang格式 虽然在过去我见过预提交跳过...
fprintf (stderr, "Could not convert python path to string\n"); return false; } setlocale (LC_ALL, oldloc.c_str ());...that the old locale is not restored if the "return false" is triggered.Fix this by using SCOPE_EXIT.Tested on aarch64-linux.Approved-By: Tom Tromey tom@tromey...
I am seeing build failure when trying to run "ninja check-msan": [39/58] Performing configure step for 'libcxx_msan-with-call' FAILED: cd /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/libcxx_msan-with-call/src/libcxx_msan-with-call-build && /usr/bin/cmake ...
利用clang-format 格式化 OC 代码,hook git commit 操作并自动格式化后进行 commit. 原著地址 square/spacecommander 改进 修改为自己喜欢的 style 了,会拦截但不会中断 commit 操作,会静默格式化后进行 commit。具体使用方法看原作者地址 readme.md。 自行配置 参考以下网址,可在线预览 http://cf.monofraps.net htt...
(omega-dev) althea@perlmutter:login17:~/code/omega/clang-format-pre-commit> pre-commit run --files components/omega/src/base/Broadcast.cpp clang-format...Failed - hook id: clang-format - exit code: 1 - files were modified by this hook components...
2 + - repo: https://github.com/pre-commit/mirrors-clang-format 3 + rev: v17.0.2 4 + hooks: 5 + - id: clang-format 6 + files: '.*\.(hpp|cpp|h)' 7 + - repo: https://github.com/pre-commit/pre-commit-hooks 8 + rev: v4.5.0 9 + hooks: 10 + - id: chec...
This PR introduces a prototype for adding the clang-format hook to pre-commit. To disable formatting, e.g., on blocks of mathematical formulas, use: // clang-format off amrex::Real x = my * cus...