Skip to main content

Crate miniextendr_lint

Crate miniextendr_lint 

Source
Expand description

miniextendr-lint: internal build-time lint helpers for the workspace.

This crate scans Rust sources for miniextendr macro usage and emits cargo warnings with actionable diagnostics. It is intended for local development and CI, not as a public API.

§Usage in build.rs

ⓘ
fn main() {
    miniextendr_lint::build_script();
}

§Configuration

  • Controlled by the MINIEXTENDR_LINT env var (enabled by default).
  • Set it to 0, false, no, or off to disable.

§Lint Codes

Each diagnostic carries a stable MXL### code. See LintCode for the full catalog.

Re-exports§

pub use crate_index::CrateIndex;
pub use crate_index::IndexError;
pub use crate_index::LintItem;
pub use crate_index::LintKind;
pub use crate_root::CrateRoot;
pub use crate_root::RootOrigin;
pub use diagnostic::Diagnostic;
pub use diagnostic::Severity;
pub use lint_code::LintCode;

Modules§

crate_index
Shared crate index built from a single parse pass over all source files.
crate_root
Where the module walk starts: the library target’s root file.
description
The R package’s DESCRIPTION: its name and the packages it declares.
diagnostic
Structured diagnostic output for lint rules.
doc_links 🔒
The doc-comment text of #[miniextendr] items that reaches roxygen2 as markdown, and the pkg::topic links inside it (MXL204).
helpers
Shared utility functions for lint rule implementations.
lint_code
Stable lint rule identifiers.
misplaced_dots 🔒
Hint for a file that fails to parse because a Rust ... parameter is not the last one (#1737).
rules
Lint rule implementations.

Structs§

LintReport
Result of running the lint over a crate source tree.

Functions§

build_directives
The cargo directives build_script prints for the crate at manifest_dir once the lint is enabled: what to watch, then the warnings.
build_script
Entry point for build.rs. Runs the lint and prints cargo directives.
lint_enabled
Returns whether the lint should run based on the given env var.
rerun_directive 🔒
A cargo::rerun-if-changed directive for path.
run
Run the lint against the crate whose Cargo.toml sits in manifest_dir.
warning_directive 🔒
A cargo::warning directive for message, on one line.