-
Notifications
You must be signed in to change notification settings - Fork 0
hyp chkcomment_en.md
maoxiaoyue edited this page May 14, 2026
·
1 revision
Scan Go source files and check whether all exported blocks have standardized documentation comments.
hyp chkcomment <file.go> # Check and report
hyp chkcomment --fix <file.go> # Auto-add suggested comments| Flag | Description |
|---|---|
--fix |
Auto-add suggested comments (creates .bak backup) |
| Type | Example |
|---|---|
| Package | package controllers |
| Type | type UserController struct |
| Func | func CreateUser(...) |
| Method | func (ctrl *UserController) Create(...) |
| Const | const MaxItems = 100 |
| Var | var ErrNotFound = ... |
When --fix is used, comments include @ai: annotations:
- All blocks:
@ai:owner ai-generated - Create/Update/Delete functions:
@ai:impact routes=/api/ - Auth/Login/Token functions:
@ai:security requires_auth
The checker recognizes @ai: annotations:
// @ai:constraint max_items=100
// @ai:deprecated use V2 instead
// @ai:security requires_auth
// @ai:impact routes=/api/users
// @ai:owner team=backend- Pure AST analysis, never executes code
- Only accepts
.gofiles, rejects symlinks -
--fixcreates.bakbackup before modifying
- hyp impact — Analyze change impact before modifying
由 台灣卯小月 用 ❤️ 製作 · MIT License And Wiki is written by Claude
設計文件
套件
- config — 設定
- context — 請求上下文
- router — 路由器
- server — 伺服器
- middleware — 中介層
- websocket — WebSocket
- hidb — 資料庫 ORM
- hidb/cassandra — Cassandra
- logger — 日誌
- json — JSON 處理
- grpc — gRPC
AI 協作工具鏈
- schema — Schema-first 路由
- manifest — 專案 Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — 智慧 Scaffold
- airules — AI Rules
CLI 命令
- hyp 總覽
- hyp new
- hyp api
- hyp run
- hyp restart
- hyp generate
- hyp migrate
- hyp context
- hyp ai-rules
- hyp chkcomment
- hyp impact
- hyp docker
- hyp health
- hyp version
- hyp difflog
Design Docs
Packages
- config — Configuration
- context — Request Context
- router — Router
- server — Server
- middleware — Middleware
- websocket — WebSocket
- hidb — Database ORM
- hidb/cassandra - Cassandra 5.0
- logger — Logger
- json — JSON
- grpc — gRPC
AI Collaboration Toolchain
- schema — Schema-first Routing
- manifest — Project Manifest
- contract — Contract Testing
- errors — Typed Error Catalog
- migrate — Migration Diff
- scaffold — Smart Scaffold
- airules — AI Rules
CLI Commands