File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if ! cargo fmt -- --check 2> /dev/null; then
4+ echo " Error: cargo fmt check failed. Run 'cargo fmt' and stage the changes."
5+ exit 1
6+ fi
Original file line number Diff line number Diff line change 22
33This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44
5+ ## Setup
6+
7+ ``` bash
8+ git config core.hooksPath .githooks # enable pre-commit fmt check
9+ ```
10+
511## Build Commands
612
713``` bash
Original file line number Diff line number Diff line change @@ -121,6 +121,16 @@ Commands:
1211214. Authenticated CONNECT requests → TCP tunnel via HTTP upgrade + bidirectional copy
1221225. Authenticated HTTP requests → forwarded to upstream with proxy headers stripped
123123
124+ ## Development
125+
126+ After cloning, enable the pre-commit hook to catch formatting issues before they reach CI:
127+
128+ ```bash
129+ git config core.hooksPath .githooks
130+ ```
131+
132+ The hook runs ` cargo fmt --check ` and blocks commits with unformatted code.
133+
124134## Testing
125135
126136``` bash
You can’t perform that action at this time.
0 commit comments