Skip to content

Tightens lint policy, documents API, and hardens runtime paths - #222

Merged
leynos merged 122 commits into
mainfrom
additional-lints
Oct 26, 2025
Merged

Tightens lint policy, documents API, and hardens runtime paths#222
leynos merged 122 commits into
mainfrom
additional-lints

Conversation

@leynos

@leynos leynos commented Oct 22, 2025

Copy link
Copy Markdown
Owner

Why

Adopting a more opinionated lint configuration surfaces latent defects,
encourages defensive coding, and provides users with better‐documented
APIs. The patch adds the missing documentation and refactors panic-prone
code so the project builds cleanly with the newly denied lints.

What

  • Lint gate
    • Denies many additional clippy::* groups, missing_docs, and
      missing_crate_level_docs.
    • Lowers cognitive–complexity threshold to 9; allows expect only
      inside tests.
  • Codebase adjustments
    • Adds or moves module roots (ir/, manifest/) to attach crate-level
      docs.
    • Replaces unchecked unwrap/expect in production code with
      fallible paths and rich error messages; keeps them in tests behind an
      explicit allowance.
    • Introduces targeted debug assertions and graceful fall-back logic
      (e.g. string conversions, thread joins, HTTP fixtures).
    • Switches eprintln! to tracing for structured logging.
    • Improves CLI path resolution and build‐script robustness.
  • Documentation
    • Provides doc comments for public structs, enums, and fields that were
      previously undocumented.

Outcome

The crate now builds with cargo clippy --all-targets -- -D warnings,
has a clearer public surface, and is less prone to runtime panics or
invalid UTF-8 issues while preserving existing behaviour in tests and
features.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant