Skip to content

doc(kpm): rationale comments for kpm/freak too_many_arguments allows (#83) - #237

Merged
kalwalt merged 1 commit into
devfrom
refactor/too-many-args-83-kpm
Aug 6, 2026
Merged

doc(kpm): rationale comments for kpm/freak too_many_arguments allows (#83)#237
kalwalt merged 1 commit into
devfrom
refactor/too-many-args-83-kpm

Conversation

@kalwalt

@kalwalt kalwalt commented Aug 6, 2026

Copy link
Copy Markdown
Member

Second increment of #83, covering the kpm/freak layer. These functions keep their #[allow(clippy::too_many_arguments)] but now document why — completing the "reduce or justify" intent for this layer.

Documented

  • homography.rs — the numerical homography routines: the 4-point solvers, conditioning/denormalization, normal-equations, preemptive_robust_homography, polish_homography. Flat point/matrix/scalar signatures mirror the math and the C++ source; a param struct would obscure them.
  • hough.rsHoughSimilarityVoting::new / new_auto_xy (mirror the C++ init parameter list) and find_hough_similarity.
  • ref_data_set.rsKpmRefDataSet::generate.

Left as-is (already documented)

  • The detector.rs module-level #![allow] — already carries the NONMAX_CHECK rationale, and it spans 34 functions; narrowing to per-fn would be churn with no lint benefit.
  • The webarkit_cpp_auto_adjust_xy_num_bins FFI extern shim (dual-mode test only).

Audit doc (docs/design/issue-83-too-many-args-audit.md) updated: every current allow is now either removed (PR #228) or carries a // rationale: note. The only remaining item is the optional pre-1.0 public-API restructure of the C-faithful ar/ar2 entry points — so #83 can be closed and that restructure tracked separately if wanted.

Verification

Comments only — no code or signatures changed. cargo fmt --check clean; clippy --workspace --all-targets --all-features -D warnings clean (run locally with LIBCLANG_PATH set — the exact CI command).

Refs #83

🤖 Generated with Claude Code

…83)

Second increment of the #83 cleanup, covering the kpm/freak layer. These
functions keep their #[allow(clippy::too_many_arguments)] but now document
why:

- homography.rs: the numerical homography routines (4-point solvers,
  conditioning/denormalization, normal-equations, preemptive_robust and
  polish) — flat point/matrix/scalar signatures mirror the math and the
  C++ source; a param struct would obscure them.
- hough.rs: HoughSimilarityVoting::new / new_auto_xy (mirror the C++ init
  parameter list) and find_hough_similarity.
- ref_data_set.rs: KpmRefDataSet::generate.

Left as-is (each already carries an explanatory rationale): the
detector.rs module-level allow (34-fn extrema-extraction module; narrowing
would be churn with no lint benefit) and the webarkit_cpp_* FFI extern
shim. Audit doc updated.

Comments only — no code or signatures changed. clippy --workspace
--all-targets --all-features -D warnings clean.

Refs #83

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kalwalt kalwalt self-assigned this Aug 6, 2026
@kalwalt kalwalt added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 6, 2026
@kalwalt kalwalt added this to the Stabilization & DX milestone Aug 6, 2026
@kalwalt
kalwalt merged commit a5bda9e into dev Aug 6, 2026
22 checks passed
@kalwalt
kalwalt deleted the refactor/too-many-args-83-kpm branch August 7, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant