whitaker-installer
Installer CLI for Whitaker Dylint lint libraries.
Whitaker is a collection of opinionated Dylint lints for Rust. This installer
builds, links, and stages the lint libraries for local use, avoiding the need
to rebuild from source on each cargo dylint invocation. It also ensures the
pinned Rust toolchain and required components are installed via rustup.
Pass --cranelift when your project, CI, or build configuration requires the
Cranelift back-end (rustc-codegen-cranelift). rustc-codegen-cranelift is an
alternative compiler back-end that uses the Cranelift code generator instead of
LLVM, which can produce faster debug builds. Some Whitaker configurations (or
CI environments that pre-install it) require it to be available alongside the
standard toolchain components. Without --cranelift, the installer only
provisions the standard required toolchain components; the flag adds
rustc-codegen-cranelift to that set so rustup component add includes it in
a single step.
Installation
Usage
Install the default lint suite
This builds and stages the aggregated suite containing all standard lints.
Install with experimental lints
At present, there are no experimental lints, so this flag is reserved for future lint previews.
Install specific lints
Install all individual lint crates
List installed lints
Output as JSON for scripting:
Preview without building
Available Lints
Whitaker lints are divided into two categories:
- Standard lints are stable, well-tested, and included in the default suite. They are recommended for general use.
- Experimental lints are newer or more aggressive checks that may produce
false positives or undergo breaking changes. They require the
--experimentalflag to install.
Standard Lints
These lints are included when running whitaker-installer without flags:
| Lint | Description |
|---|---|
bumpy_road_function |
Detect multiple complexity clusters in functions |
conditional_max_n_branches |
Limit boolean branches in conditionals |
function_attrs_follow_docs |
Doc comments must precede other attributes |
module_max_lines |
Warn when modules exceed line threshold |
module_must_have_inner_docs |
Require inner doc comments on modules |
no_expect_outside_tests |
Forbid .expect() outside test contexts |
test_must_not_have_example |
Forbid examples in test documentation |
no_std_fs_operations |
Enforce capability-based filesystem access |
no_unwrap_or_else_panic |
Deny panicking unwrap_or_else fallbacks |
Experimental Lints
There are currently no experimental lints. The --experimental flag remains
available for future releases that add preview lints.
Using the Installed Lints
After installation, set DYLINT_LIBRARY_PATH to the staged directory and run
cargo dylint:
The installer generates wrapper scripts and provides shell configuration snippets to simplify this setup.
Dependency-tool verification is asymmetric by design:
cargo-dylintis checked by runningcargo dylint --version.dylint-linkis never executed. It is a linker wrapper that forwards its entire argument list to the underlying linker, so it has no reliable self-reporting subcommand:--versionexits early, and--helpdepends on a usable linker and toolchain in the ambient environment. Executing it as a health check rejects valid artefacts. A Cargo-manageddylint-linkis instead checked by two independent conditions: an executable file resolves onPATH, and Cargo's recorded installed version for thedylint-linkpackage matches the expected version. A repository-releasedylint-linkis trusted after its install pipeline succeeds (see below).
For repository-release installs, the trust boundary is the pipeline itself: the
release asset name pins the package and version, the .sha256 sidecar
establishes integrity, extraction confirms the expected archive member, and the
permission step establishes launch eligibility. Genuine failures in any of
those steps — a missing asset, checksum mismatch, failed download or
extraction, or an unwritable executable — still fall back to Cargo.
On Windows, the installer honours PATHEXT while scanning PATH, so the
normal Cargo-installed dylint-link.exe and other shell-resolved executable
suffixes are recognized.
The wrappers are:
whitaker— runscargo dylintwith the staged library path.whitaker-ls— lists installed Whitaker suite libraries for the staged path.
Licence
ISC