Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CLAUDE.md - Guidelines for Fossa CLI

## Build Commands

- Haskell: `cabal build`, `make build-cli`
- Rust: `cargo build --release`
- Full Build: `make build` (builds both)
Expand All @@ -12,23 +13,29 @@
- Analyze Project: `make analyze`

## Code Quality Standards

- Compiler warnings should be treated as errors and fixed, not ignored
- Linter warnings should be treated as errors and fixed, not ignored
- All tests must pass before submitting code
- Code should be thoroughly tested with appropriate unit tests

## Code Style Guidelines - Haskell

- GHC Version: 9.8
- Formatting: `fourmolu` with 2 spaces, leading commas
- Imports: Use explicit imports, qualified with full names
- Types: Prefer `newtype`, use `Text` instead of `String`
- Functions: Avoid partial functions, list comprehensions, match guards
- Error handling: Never use `error` or `undefined`
- **Tests**: A narrow set of partial functions is allowed in `**.*Spec` modules
as configured in `.hlint.yaml` (`head`, `tail`, `last`, `!!`,
`Data.List.NonEmpty.fromList`). Use them sparingly and prefer safe alternatives.

## Code Style Guidelines - Rust

- Format with `rustfmt` via `cargo fmt`
- Lint with Clippy via `cargo clippy`
- Follow standard Rust idioms including error handling
- Use the Rust embedded tools within the Haskell code via the extlib directory

For complete guidelines, see `docs/contributing/STYLE-GUIDE.md`
For complete guidelines, see `docs/contributing/STYLE-GUIDE.md`
3 changes: 3 additions & 0 deletions spectrometer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ library
Strategy.Node.Npm.PackageLockV3
Strategy.Node.PackageJson
Strategy.Node.Pnpm.PnpmLock
Strategy.Node.Pnpm.Types
Strategy.Node.Pnpm.V4_8
Strategy.Node.Pnpm.V9
Strategy.Node.Pnpm.Workspace
Strategy.Node.YarnV1.YarnLock
Strategy.Node.YarnV2.Lockfile
Expand Down
Loading
Loading