Repository navigation
fix(hooks): 위반 경고마다 file:line 과 걸린 규칙을, 요약 줄에도 위치를 실어요 - #37
Merged
Merged
Conversation
실측(one-tenth): 한 커밋은 파일 이름이 나왔고, 다른 커밋은 "⚠ CRITICAL 위반 1건 — 경고만 (mode=warning)" 한 줄만 보여서 위치를 diff 에서 손으로 찾았어요. 시크릿은 줄 없이 파일 이름만 찍었고, 요약 줄에는 위치가 없어서 출력이 잘리거나 다른 훅 출력과 섞이면 위치가 사라졌어요. - critical-rule-grep: `report <category> <file:line> <규칙>` — 위반마다 ` ⚠ file:line — 규칙` 한 줄. 시크릿도 걸린 줄마다 `file:line — secrets:<라벨>` (줄 내용은 여전히 안 찍어요). 예전 2인자 호출(프로젝트가 채운 스캐폴드)도 그대로 찍혀요 - 요약 줄 `CRITICAL 위반 N건 — …` 에 앞 3곳 + "외 N건" 을 실어요 — 모드(warning·fail) 무관 - check-mistake-secrets: 파일 목록에 줄 번호(`file:3,7`)를, 요약 줄에 위치를 smoke §60: warning·fail 두 모드에서 위반 줄과 요약 줄 양쪽에 file:line·규칙, 시크릿 값 비노출, mistake 파일 줄 번호, 요약 축약(앞 3곳 + 외 2건). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8rZ6V3FW3nwYA9T7iygPd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇이 좋아지나
file:line — 규칙한 줄이에요. 실측(one-tenth): 한 커밋은 파일 이름이 나왔고, 다른 커밋은⚠ CRITICAL 위반 1건 — 경고만 (mode=warning)한 줄만 보여서 위치를 diff 에서 손으로 찾았어요Secrets 추정 패턴 — N개 파일: a b처럼 파일 이름뿐이었어요. 이제src/cfg.ts:4 — secrets:kv-detect (값은 안 찍어요). 줄 내용은 여전히 안 찍어요check-mistake-secrets도 같은 규약 — 파일 목록에 줄 번호(file:3,7), 요약 줄에 위치출력 예 (mode=warning):
바뀐 파일
templates/default/.ax/hooks/pre-commit/critical-rule-grep.sh—report <category> <file:line> <규칙>+locs_tail. 예전 2인자 호출(프로젝트가 채웠을 수 있는 스캐폴드)도 그대로 찍혀요templates/default/.ax/hooks/pre-commit/check-mistake-secrets.shtemplates/default/.ax/hooks/README.mdtests/smoke.sh새 §60검증 (빨강 → 초록)
수정 전 훅에 §60 만 얹었을 때:
수정 후:
token: string,)을 시크릿으로 잡던 것 — 타입 자리만 지우고 값 대입은 그대로 잡아요 #30 의 737 + 7) — macOS(bash 3.2) 로컬 · ubuntu 24.04 컨테이너도 744 통과 (base 가 main 이 아니라 CI 가 안 돌아요)AKIAIOSFODNN7EXAMPLE·hunter2xyz99가 출력에 없음) 그대로 통과버전·changelog 는 올리지 않았어요 (#30 과 같은 이유).
🤖 Generated with Claude Code
https://claude.ai/code/session_01C8rZ6V3FW3nwYA9T7iygPd