diff --git a/Makefile b/Makefile index 12a52dec..6dda22f0 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,25 @@ -# .PHONY: reformat -# reformat: -# find \ -# ./firmware-demo/src/ \ -# ./lib/lilka \ -# -not \( -name .ccls-cache -prune \) \ -# -not \( -name .pio -prune \) \ -# -iname *.h \ -# -o -iname *.cpp \ -# | xargs clang-format -i +help: ## Show this help + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}' -all: - false +.PHONY: reformat +reformat: ## Reformat all source files + @find \ + . \ + -not \( -name .ccls-cache -prune \) \ + -not \( -name .pio -prune \) \ + -not \( -name mjs -prune \) \ + -not \( -name doomgeneric -prune \) \ + -not \( -name bak -prune \) \ + -iname *.h \ + -o -iname *.cpp \ + -o -iname *.c \ + -o -iname *.hpp \ + -o -iname *.h \ + -o -iname *.rst \ + | xargs clang-format -i .PHONY: todo -todo: - @# Find all files, but exclude .pio and .ccls-cache directories - @# Preserve colors in output +todo: ## Find all TODO, FIXME, XXX comments @find \ . \ -not \( -name .ccls-cache -prune \) \ @@ -32,12 +36,19 @@ todo: | xargs grep --color=always -n -H -E "TODO|FIXME|XXX" \ .PHONY: check -check: clang-format cppcheck +check: clang-format cppcheck ## Run all checks + +.ONESHELL: check-docker +check-docker: ## Run all checks in docker + docker build -t lilka-check -f - . <draw16bitRGBBitmapWithTranColor( xOffset, 0, battery_absent, lilka::display.color565(255, 0, 255), 32, 24 ); } else { + int16_t x1 = 6, y1 = 8; + int16_t fullWidth = 22, h = 8; int filledWidth = fullWidth * level / 100; if (filledWidth < 1) filledWidth = 1; int16_t color =