Contributing
Development Setup
Section titled “Development Setup”git clone https://github.com/LarsArtmann/art-dupl.gitcd art-duplgo build ./...go test ./...Or with Nix for a fully reproducible environment:
nix develop # Enter dev shellnix build # Buildnix flake check # Full CI checkTesting
Section titled “Testing”go test ./... # All testsgo test -race ./... # Race detectorgo test -count=1 ./suffixtree/... # Specific packagegolangci-lint run --timeout 5m ./... # LintTests use standard testing + Ginkgo/Gomega BDD in bdd/.
Code Style
Section titled “Code Style”- Idiomatic Go only — standard
(T, error)returns, no Result/Option types - Strong types over runtime checks
- Small, focused functions
- Early returns over nested conditionals
- Descriptive names over comments
Architecture
Section titled “Architecture”See the README for the package overview. Key conventions:
- Domain types in
domain/, aliased byconfig/,pkg/artdupl/,detection/ - Errors use typed hierarchy from
errors/package - Context propagation in all pipeline goroutines
- Enum pattern via
pkg/enumshared helpers
Pull Requests
Section titled “Pull Requests”- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure
go test ./...andgolangci-lint runpass - Submit a pull request
Reporting Issues
Section titled “Reporting Issues”Use GitHub Issues for bug reports and feature requests. When reporting false positives, include:
- The detected clone group (use
--jsonoutput) - Whether it’s generated code
- The threshold used