rsconstruct 0.9.176

Rust based fast build system
//! pylint checker — registered as a {`SimpleChecker`}.

use crate::config::{ExtraTool, SimpleCheckerParams};
use crate::processor::SimpleChecker;

fn create_pylint(toml: &toml::Value) -> anyhow::Result<Box<dyn crate::processor::Processor>> {
    crate::registries::deserialize_and_create(toml, |cfg| {
        Box::new(SimpleChecker::new(
            cfg,
            SimpleCheckerParams {
                description: "Lint Python files using pylint",
                subcommand: None,
                prepend_args: &[],
                extra_tools: &[ExtraTool::Python],
            },
        ))
    })
}
inventory::submit! { crate::registries::ProcessorPlugin {
    version: 1,
    name: "pylint", processor_type: crate::processor::ProcessorType::Checker, create: create_pylint,
    fields: &[],
    omit_standard_fields: &["formats", "output_dir"],
    scan_defaults: Some(crate::config::ScanDefaultsData { src_dirs: &[], src_extensions: &[".py"], src_exclude_dirs: &[] }),
    // pylint's `find_default_config_files`: the rc names in its lookup order,
    // then `pyproject.toml` (`[tool.pylint]`), `setup.cfg` and `tox.ini`
    // (`[pylint.*]` sections), all looked up from the working directory.
    defaults: Some(crate::config::ProcessorDefaults { command: "pylint", dep_auto: &["pylintrc", "pylintrc.toml", ".pylintrc", ".pylintrc.toml", "pyproject.toml", "setup.cfg", "tox.ini"], output_depends_on_input_name: true, hash_python_env: true, ..crate::config::ProcessorDefaults::EMPTY }),
    defconfig_json: crate::registries::default_config_json::<crate::config::StandardConfig>,
    keywords: &["python", "linter", "py", "pip"],
    description: "Lint Python files using pylint",
    is_builtin: false,
    is_rust: false,
    supports_batch: true,
    caches_outputs: true,
    sandboxable: true,
    max_jobs_cap: None,
} }
inventory::submit! { crate::tools::ToolInfo {
    name: "pylint", runtime: "python",
    project: Some(crate::tools::InstallMethod::new("pip", "pylint")),
    machine: Some(crate::tools::InstallMethod::new("pip", "pylint")),
    alternatives: &[], prefer: None, sandbox_writable: &["**/__pycache__"], needs_network: false,
} }