File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 11on :
22 push :
3- branches : [main ]
3+ branches : ['*' ]
44
55permissions :
66 contents : write
1515 uses : actions/setup-go@v4
1616 - name : " Run tests"
1717 run : |
18- go test
18+ go test ./...
1919
2020 release :
21+ needs : test
22+ if : github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event_name == 'push'
2123 runs-on : ubuntu-latest
2224 steps :
2325 - name : Checkout
Original file line number Diff line number Diff line change 1+ # CLAUDE.md - Development Guidelines for codacy-cli-v2
2+
3+ ## Build & Test Commands
4+ - Build: ` go build ./cli-v2.go `
5+ - Run all tests: ` go test ./... `
6+ - Run specific test: ` go test -run TestName ./package/path `
7+ - Example: ` go test -run TestGetTools ./tools `
8+ - Format code: ` go fmt ./... `
9+ - Lint: ` golint ./... ` (if installed)
10+
11+ ## Code Style Guidelines
12+ - ** Imports** : Standard lib first, external packages second, internal last
13+ - ** Naming** : PascalCase for exported (public), camelCase for unexported (private)
14+ - ** Error handling** : Return errors as last value, check with ` if err != nil `
15+ - ** Testing** : Use testify/assert package for assertions
16+ - ** Package organization** : Keep related functionality in dedicated packages
17+ - ** Documentation** : Document all exported functions, types, and packages
18+ - ** Commit messages** : Start with verb, be concise and descriptive
19+
20+ ## Project Structure
21+ - ` cmd/ ` : CLI command implementations
22+ - ` config/ ` : Configuration handling
23+ - ` tools/ ` : Tool-specific implementations
24+ - ` utils/ ` : Utility functions
You can’t perform that action at this time.
0 commit comments