diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -76,7 +76,9 @@ lint/python3: lint/%: black --check $(sources_$*) isort --check $(sources_$*) lint/c: lint/%: - @: TODO + clang-format --dry-run -Werror -- $(sources_$*) +lint/yaml: lint/%: + yamlfmt -lint $(sources_$*) lint/make lint/cmake lint/gitignore lint/ini lint/9p lint/markdown: lint/%: @: lint/unknown: lint/%: @@ -89,7 +91,7 @@ lint/all: lint/%: if ! grep -q 'Copyright (C) 2024 Luke T. Shumaker' $$filename; then \ echo "$$filename is missing a copyright statement"; r=1; continue; \ fi; \ - dscname=$$(sed -n '1,3{ /^#!/d; /^<!--$$/d; /-\*- .* -\*-/d; s,[/*# ]*,,; s/ - .*//;p; q; }' $$filename); \ + dscname=$$(sed -En '1,3{ /^#!|^<!--$$|-\*- .* -\*-|^---$$/d; s,[/*# ]*,,; s/ - .*//;p; q; }' $$filename); \ filename_alt1=$$(echo "$$filename" | sed \ -e 's,^cmd/,,' \ -e 's,.*/include/,,' \ @@ -112,7 +114,9 @@ format/python3: format/%: format/sh format/bash: format/% @: format/c: format/%: - @: TODO + clang-format -i -- $(sources_$*) +format/yaml: format/%: + yamlfmt $(sources_$*) format/make format/cmake format/gitignore format/ini format/9p format/markdown: format/%: @: format/unknown: format/%: |