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_LINTenv var (enabled by default). - Set it to
0,false,no, oroffto 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 thepkg::topiclinks 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§
- Lint
Report - Result of running the lint over a crate source tree.
Functions§
- build_
directives - The cargo directives
build_scriptprints for the crate atmanifest_dironce 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-changeddirective forpath. - run
- Run the lint against the crate whose
Cargo.tomlsits inmanifest_dir. - warning_
directive 🔒 - A
cargo::warningdirective formessage, on one line.