|
| 1 | +# CLAUDE.md - Guidelines for Fossa CLI |
| 2 | + |
| 3 | +## Build Commands |
| 4 | +- Haskell: `cabal build`, `make build-cli` |
| 5 | +- Rust: `cargo build --release` |
| 6 | +- Full Build: `make build` (builds both) |
| 7 | +- Unit Tests (Haskell): `cabal test unit-tests` or `make test-cabal ARGS="TestName"` |
| 8 | +- Unit Tests (Rust): `cargo test` or `make test-cargo` |
| 9 | +- Integration Tests: `make integration-test ARGS="TestName"` |
| 10 | +- Format Code: `make fmt` (runs both formatters) |
| 11 | +- Lint Code: `make lint` (runs both linters) |
| 12 | +- Analyze Project: `make analyze` |
| 13 | + |
| 14 | +## Code Quality Standards |
| 15 | +- Compiler warnings should be treated as errors and fixed, not ignored |
| 16 | +- Linter warnings should be treated as errors and fixed, not ignored |
| 17 | +- All tests must pass before submitting code |
| 18 | +- Code should be thoroughly tested with appropriate unit tests |
| 19 | + |
| 20 | +## Code Style Guidelines - Haskell |
| 21 | +- GHC Version: 9.8 |
| 22 | +- Formatting: `fourmolu` with 2 spaces, leading commas |
| 23 | +- Imports: Use explicit imports, qualified with full names |
| 24 | +- Types: Prefer `newtype`, use `Text` instead of `String` |
| 25 | +- Functions: Avoid partial functions, list comprehensions, match guards |
| 26 | +- Error handling: Never use `error` or `undefined` |
| 27 | + |
| 28 | +## Code Style Guidelines - Rust |
| 29 | +- Format with `rustfmt` via `cargo fmt` |
| 30 | +- Lint with Clippy via `cargo clippy` |
| 31 | +- Follow standard Rust idioms including error handling |
| 32 | +- Use the Rust embedded tools within the Haskell code via the extlib directory |
| 33 | + |
| 34 | +For complete guidelines, see `docs/contributing/STYLE-GUIDE.md` |
0 commit comments