mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 09:21:39 +00:00
1.3 KiB
1.3 KiB
CLAUDE.md - Developer Guidelines for SNRD Codebase
Build & Test Commands
make build- Build application binarymake install- Install applicationmake test- Run unit testsmake test-unit- Run all unit testsmake test-race- Run tests with race detectionmake test-cover- Run tests with coveragemake lint- Run golangci-lint and formatting checksmake format- Format code using gofumptmake proto-gen- Generate Protobuf filesmake testnet- Setup and run local testnet with IBC
Code Style Guidelines
- Imports: Group by standard library, third-party, then project-specific with blank lines between
- Error Handling: Use custom errors from
types/errors.gowithsdkerrors.Registerand prefix errors withErr - Naming: Use camelCase for variables, PascalCase for functions/exported types
- Organization: Follow Cosmos SDK module pattern (
x/{module}/,types/,keeper/) - Documentation: Use standard Go doc comments, document public APIs thoroughly
- Types: Prefer explicit types over interface{}, use pointers for mutable state
- Design: Follow dependency injection pattern for module components
- Formatting: Run
make formatbefore committing
Follows standard Go conventions and Cosmos SDK patterns with clear organization and consistent error handling.