mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
1.4 KiB
1.4 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build Commands
make build- Build application binarymake install- Install applicationmake proto-gen- Generate Protobuf filesmake mod-tidy- Run go mod tidy
Test Commands
make test- Run unit testsmake test-unit- Run all unit testsmake test-race- Run tests with race detection- For single test:
go test -v -run TestName ./path/to/package
Lint Commands
make lint- Run golangci-lint and formatting checksmake format- Format code using gofumpt, misspell and gci
Code Style Guidelines
- Imports: Group by standard library, third-party, then project-specific with blank lines
- Error Handling: Use custom errors from
types/errors.gowithsdkerrors.Register - Naming: camelCase for variables, PascalCase for functions/exported types, prefix errors with
Err - Organization: Follow Cosmos SDK module pattern (
x/{module}/,types/,keeper/) - Types: Prefer explicit types over interface{}, use pointers for mutable state
- Documentation: Document public APIs thoroughly with standard Go doc comments
- Formatting: Run
make formatbefore committing
This project follows standard Go conventions and Cosmos SDK patterns with clear organization and consistent error handling.