Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Problems

  1. fmt-check was silently passing even with unformatted code

    • Makefile piped prettier --check through grep -v 'No files matching'
    • Piping replaced prettier's exit code (1) with grep's (0)
    • CI showed warnings but jobs passed ✅
  2. No convenient workflow for adding screenshots to docs

Solutions

Fixed fmt-check exit code handling:

-@bun x prettier --check $(PRETTIER_PATTERNS) 2>&1 | grep -v 'No files matching'
+@bun x prettier --check $(PRETTIER_PATTERNS)

Added scripts/quick-cp-screenshot.sh:

  • Finds latest screenshot from ~/Documents/Screenshots or ~/Desktop
  • Converts PNG to WebP using cwebp -q 85 (as lint requires)
  • Saves to docs/img/<name>.webp
  • Removes original screenshot

Usage: ./scripts/quick-cp-screenshot.sh my-feature

Formatted previously unformatted files:

These files were already unformatted in main because fmt-check was passing incorrectly.

Verification

make fmt-check now properly fails when files need formatting:

[warn] docs/vim-mode.md
make[1]: *** [Makefile:89: fmt-check] Error 1

Generated with cmux

- also fix CI bug wrt fmt check
@ammario ammario enabled auto-merge October 9, 2025 17:17
@ammario ammario added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit 0bda2fd Oct 9, 2025
11 of 12 checks passed
@ammario ammario deleted the docs branch October 9, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants