sonar.projectKey=randomparity_bzr
sonar.organization=randomparity
sonar.sources=src
sonar.tests=tests
sonar.sourceEncoding=UTF-8
sonar.rust.lcov.reportPaths=lcov.info

# Exclude categorically-structural duplication from copy-paste detection.
# Forcing extraction in any of these cases would create bad abstractions
# per the project's discipline rule (see docs/specs/2026-04-27-sonar-refactor-design.md).
#
# - **`**/*_tests.rs`** — test code lives in src/ alongside production code
#   (sibling `*_tests.rs` files linked via `#[cfg(test)] #[path =
#   "X_tests.rs"] mod tests;`). Test-fixture boilerplate is categorically
#   different from production duplication.
#
# - **`src/cli/bug.rs` and `src/cli/query.rs`** — the 8 issue-#158 filter
#   flags (`--whiteboard`, `--target-milestone`, `--version`, `--op-sys`,
#   `--platform`, `--resolution`, `--qa-contact`, `--url`) appear
#   identically in `BugAction::List`, `QueryAction::Save`, and
#   `QueryAction::Run` because the user invokes them on three different
#   subcommands. Hoisting them into a `#[derive(clap::Args)]` struct hides
#   the surface area at every site without removing the underlying
#   triplication (each variant still has to `#[command(flatten)]` it and
#   per-flag doc strings differ between Save and Run). Scoped to these two
#   files only — the other ~12 cli/ modules don't have triplicated flag
#   blocks, so accidental duplication there should still be caught.
#
# - **`src/types/bug.rs`** — the file pairs structurally-symmetric data
#   shapes that exist by design: `FIELD_MAPPINGS` is a 15-row regular data
#   table where row similarity is the point; `match_field!` arms in
#   `SearchParams::get_field` and `SavedQuery::get_field_mut` are already
#   collapsed to a single per-field declaration via the macro;
#   `has_filters` and `has_structured_filters` enumerate every filter field
#   with a deliberate one-line difference (free-text vs structured).
sonar.cpd.exclusions=**/*_tests.rs,src/cli/bug.rs,src/cli/query.rs,src/types/bug.rs
