Skip to content

Instantly share code, notes, and snippets.

@MikuroXina
Last active April 26, 2026 11:48
Show Gist options
  • Select an option

  • Save MikuroXina/de4d5877145d6b6315c1c1256a048657 to your computer and use it in GitHub Desktop.

Select an option

Save MikuroXina/de4d5877145d6b6315c1c1256a048657 to your computer and use it in GitHub Desktop.
Clang-format linter with git 2.54 config-based hook.
[hook "clang-format"]
event = pre-commit
command = "git clang-format --diff --quiet || (echo 'Run `git clang-format` to fix the errors.'; exit 1)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment