Skip to content

Commit 411bf10

Browse files
committed
docs: add code update workflow guidelines
1 parent c18d98a commit 411bf10

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,39 @@ cd _llcppgtest/cjson
153153
llcppg llcppg.cfg
154154
```
155155

156+
## Code Update Workflow
157+
158+
### Making Improvements
159+
When updating code in this repository, follow this workflow:
160+
161+
1. **Create Feature Branch from Main**
162+
```bash
163+
git checkout main
164+
git checkout -b feature/your-improvement-name
165+
```
166+
167+
2. **Make Changes and Test**
168+
```bash
169+
# Run relevant tests
170+
go test ./config
171+
go test ./cl/internal/convert
172+
```
173+
174+
3. **Commit and Push**
175+
```bash
176+
git add .
177+
git commit -m "scope: brief description"
178+
git push -u origin feature/your-improvement-name
179+
```
180+
181+
4. **Create PR with Description**
182+
183+
### Code Quality Guidelines
184+
- Follow Uber Go Style Guide: https://github.com/uber-go/guide/blob/master/style.md
185+
- Use `errors.New` for static error messages, `fmt.Errorf` for dynamic ones
186+
- Follow Go naming conventions (e.g., `ErrConfig` not `ErrConfigError`)
187+
- Prefer returning errors over `panic()` in library code
188+
156189
## Important Notes
157190

158191
- The `_xtool/` components must be compiled with LLGo, not regular Go

0 commit comments

Comments
 (0)