use crate::processors::SimpleChecker;
use crate::config::SimpleCheckerParams;
fn create_checkpatch(toml: &toml::Value) -> anyhow::Result<Box<dyn crate::processors::Processor>> {
crate::registries::deserialize_and_create(toml, |cfg| Box::new(SimpleChecker::new(cfg, SimpleCheckerParams { description: "Check kernel patches using checkpatch.pl", subcommand: None, prepend_args: &["--no-tree", "-f"], extra_tools: &["perl"], fix_subcommand: None, fix_prepend_args: &[], fix_batch: None })))
}
inventory::submit! { crate::registries::ProcessorPlugin {
version: 1,
name: "checkpatch", processor_type: crate::processors::ProcessorType::Checker, create: create_checkpatch,
known_fields: crate::registries::typed_known_fields::<crate::config::StandardConfig>,
output_fields: crate::registries::typed_output_fields::<crate::config::StandardConfig>,
must_fields: crate::registries::typed_must_fields::<crate::config::StandardConfig>,
field_descriptions: crate::registries::typed_field_descriptions::<crate::config::StandardConfig>,
defconfig_json: crate::registries::default_config_json::<crate::config::StandardConfig>,
keywords: &["c", "linux", "kernel", "checker", "patch"],
description: "Check kernel patches using checkpatch.pl",
is_native: false,
can_fix: false,
} }