Skip to content

Contributing

Terminal window
git clone https://github.com/LarsArtmann/art-dupl.git
cd art-dupl
go build ./...
go test ./...

Or with Nix for a fully reproducible environment:

Terminal window
nix develop # Enter dev shell
nix build # Build
nix flake check # Full CI check
Terminal window
go test ./... # All tests
go test -race ./... # Race detector
go test -count=1 ./suffixtree/... # Specific package
golangci-lint run --timeout 5m ./... # Lint

Tests use standard testing + Ginkgo/Gomega BDD in bdd/.

  • 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

See the README for the package overview. Key conventions:

  • Domain types in domain/, aliased by config/, pkg/artdupl/, detection/
  • Errors use typed hierarchy from errors/ package
  • Context propagation in all pipeline goroutines
  • Enum pattern via pkg/enum shared helpers
  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Ensure go test ./... and golangci-lint run pass
  5. Submit a pull request

Use GitHub Issues for bug reports and feature requests. When reporting false positives, include:

  • The detected clone group (use --json output)
  • Whether it’s generated code
  • The threshold used