summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 00:11:56 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 13:34:23 -0600
commit1efe4e42745d79546160a581e1487c5c2f02d6bb (patch)
treedfa5f3aca9a0059b3d827795913dc24fe5d3d171 /GNUmakefile
parent42fb27570262b52e2ca889030c621b5f4af76fe1 (diff)
wip clang-formatlukeshu/clang-format
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 9836b33..e56b353 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -130,7 +130,10 @@ lint/unknown: lint/%: build-aux/lint-unknown
.PHONY: lint lint/%
# specific #########
lint/c: lint/%: build-aux/lint-h build-aux/get-dscname
+ clang-format -Werror --dry-run -- $(sources_$*)
./build-aux/lint-h $(filter %.h,$(sources_$*))
+lint/yaml: lint/%:
+ yamlfmt -lint $(sources_$*)
lint/sh lint/bash: lint/%:
shellcheck $(sources_$*)
shfmt --diff --case-indent --simplify $(sources_$*)
@@ -151,7 +154,9 @@ format:
.PHONY: format format/%
# specific #########
format/c: format/%:
- @: TODO: Adopt a C code-formatter
+ clang-format -Werror -i -- $(sources_$*)
+format/yaml: format/%:
+ yamlfmt $(sources_$*)
format/sh format/bash: format/%:
shfmt --write --case-indent --simplify $(sources_$*)
format/python3: format/%: ./build-aux/venv