From 14c9ee2cb415a5c78ff8660518b80cfc4ca0be50 Mon Sep 17 00:00:00 2001 From: Ammar Date: Fri, 14 Nov 2025 02:35:32 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20refactor:=20reduce=20make=20?= =?UTF-8?q?fmt=20verbosity=20when=20no=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use --log-level error for prettier --write (suppresses file-by-file output) - Use --log-level warn for prettier --check (shows warnings, not verbose logs) - Add --quiet flag to ruff format commands - Redirect shfmt output to /dev/null during formatting Before: Listed every file checked with timing info (100+ lines of output) After: Only shows section headers and final success message (~6 lines) Generated with `mux` --- fmt.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fmt.mk b/fmt.mk index 7f4f719c1..e5de0bfd8 100644 --- a/fmt.mk +++ b/fmt.mk @@ -26,11 +26,11 @@ fmt-check: fmt-prettier-check fmt-shell-check fmt-python-check fmt-nix-check fmt-prettier: @echo "Formatting TypeScript/JSON/Markdown files..." - @$(PRETTIER) --write $(PRETTIER_PATTERNS) + @$(PRETTIER) --log-level error --write $(PRETTIER_PATTERNS) fmt-prettier-check: @echo "Checking TypeScript/JSON/Markdown formatting..." - @$(PRETTIER) --check $(PRETTIER_PATTERNS) + @$(PRETTIER) --log-level warn --check $(PRETTIER_PATTERNS) fmt-shell: ifeq ($(SHFMT),) @@ -38,7 +38,7 @@ ifeq ($(SHFMT),) @exit 1 else @echo "Formatting shell scripts..." - @shfmt -i 2 -ci -bn -w $(SHELL_SCRIPTS) + @shfmt -i 2 -ci -bn -w $(SHELL_SCRIPTS) >/dev/null endif fmt-shell-check: @@ -59,11 +59,11 @@ endif fmt-python: .check-uvx @echo "Formatting Python files..." - @$(UVX) ruff format $(PYTHON_DIRS) + @$(UVX) ruff format --quiet $(PYTHON_DIRS) fmt-python-check: .check-uvx @echo "Checking Python formatting..." - @$(UVX) ruff format --check $(PYTHON_DIRS) + @$(UVX) ruff format --quiet --check $(PYTHON_DIRS) fmt-nix: ifeq ($(NIX),) From 08d96cc18c8fe877cd366f5d9a047b05012d25eb Mon Sep 17 00:00:00 2001 From: Ammar Date: Fri, 14 Nov 2025 02:38:29 +0000 Subject: [PATCH 2/2] Use --log-level log for fmt-check to preserve file list Codex feedback: --log-level warn suppresses the file list when prettier --check fails, making it impossible to know which files need formatting. --log-level log: - Shows failing file paths when issues are found - Suppresses verbose (unchanged) messages for clean files - Maintains clean output in success case --- fmt.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmt.mk b/fmt.mk index e5de0bfd8..d8962ab17 100644 --- a/fmt.mk +++ b/fmt.mk @@ -30,7 +30,7 @@ fmt-prettier: fmt-prettier-check: @echo "Checking TypeScript/JSON/Markdown formatting..." - @$(PRETTIER) --log-level warn --check $(PRETTIER_PATTERNS) + @$(PRETTIER) --log-level log --check $(PRETTIER_PATTERNS) fmt-shell: ifeq ($(SHFMT),)