From 691085d82f69b16d91b6870a3af42361cdea81f9 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Fri, 15 Jan 2021 14:57:08 +0100 Subject: [PATCH] Add formatting to precommit Signed-off-by: Matej Focko --- .pre-commit-config.yaml | 7 +++++++ main.c | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d7967b..be29ccf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,3 +14,10 @@ repos: - id: check-rebase args: - https://git.mfocko.xyz/mfocko/precommit-example.git +- repo: local + hooks: + - id: formatting + name: format source + entry: make format + language: system + pass_filenames: false diff --git a/main.c b/main.c index 5564806..3b7eca3 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,4 @@ #include #include -int main() { - return NULL; -} +int main() { return NULL; }