Add formatting to precommit

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2021-01-15 14:57:08 +01:00
parent 29f162d947
commit 691085d82f
2 changed files with 8 additions and 3 deletions

View file

@ -14,3 +14,10 @@ repos:
- id: check-rebase - id: check-rebase
args: args:
- https://git.mfocko.xyz/mfocko/precommit-example.git - https://git.mfocko.xyz/mfocko/precommit-example.git
- repo: local
hooks:
- id: formatting
name: format source
entry: make format
language: system
pass_filenames: false

4
main.c
View file

@ -1,6 +1,4 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
int main() { int main() { return NULL; }
return NULL;
}