Skip to content

Commit 7f65d77

Browse files
authored
🤖 ci: reduce make fmt verbosity when no changes (#585)
Formatter tools were outputting file-by-file status even when nothing changed, producing 100+ lines of noise. Now they only show section headers and a final success message (~6 lines). **Changes:** - prettier: Use `--log-level error` for write, `--log-level warn` for check - ruff: Add `--quiet` flag to suppress detailed output - shfmt: Redirect stdout to `/dev/null` during formatting Output still shows warnings when files need formatting and maintains proper exit codes. _Generated with `mux`_
1 parent 7829bf1 commit 7f65d77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fmt.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ fmt-check: fmt-prettier-check fmt-shell-check fmt-python-check fmt-nix-check
2626

2727
fmt-prettier:
2828
@echo "Formatting TypeScript/JSON/Markdown files..."
29-
@$(PRETTIER) --write $(PRETTIER_PATTERNS)
29+
@$(PRETTIER) --log-level error --write $(PRETTIER_PATTERNS)
3030

3131
fmt-prettier-check:
3232
@echo "Checking TypeScript/JSON/Markdown formatting..."
33-
@$(PRETTIER) --check $(PRETTIER_PATTERNS)
33+
@$(PRETTIER) --log-level log --check $(PRETTIER_PATTERNS)
3434

3535
fmt-shell:
3636
ifeq ($(SHFMT),)
3737
@echo "Error: shfmt not found. Install with: brew install shfmt"
3838
@exit 1
3939
else
4040
@echo "Formatting shell scripts..."
41-
@shfmt -i 2 -ci -bn -w $(SHELL_SCRIPTS)
41+
@shfmt -i 2 -ci -bn -w $(SHELL_SCRIPTS) >/dev/null
4242
endif
4343

4444
fmt-shell-check:
@@ -59,11 +59,11 @@ endif
5959

6060
fmt-python: .check-uvx
6161
@echo "Formatting Python files..."
62-
@$(UVX) ruff format $(PYTHON_DIRS)
62+
@$(UVX) ruff format --quiet $(PYTHON_DIRS)
6363

6464
fmt-python-check: .check-uvx
6565
@echo "Checking Python formatting..."
66-
@$(UVX) ruff format --check $(PYTHON_DIRS)
66+
@$(UVX) ruff format --quiet --check $(PYTHON_DIRS)
6767

6868
fmt-nix:
6969
ifeq ($(NIX),)

0 commit comments

Comments
 (0)