use crate::declare_missing_section_lint;
declare_missing_section_lint! {
mod prep,
struct MissingPrepSection,
id: "RPM016",
name: "missing-prep-section",
description: "Spec should declare a %prep section to unpack and patch sources.",
severity: Severity::Warn,
kind: BuildScriptKind::Prep,
message: "spec is missing the %prep section",
good_fixture: "Name: x\n%prep\n",
bad_fixture: "Name: x\n",
}
declare_missing_section_lint! {
mod build,
struct MissingBuildSection,
id: "RPM017",
name: "missing-build-section",
description: "Spec should declare a %build section to compile sources.",
severity: Severity::Warn,
kind: BuildScriptKind::Build,
message: "spec is missing the %build section",
good_fixture: "Name: x\n%build\n",
bad_fixture: "Name: x\n",
}
declare_missing_section_lint! {
mod install,
struct MissingInstallSection,
id: "RPM018",
name: "missing-install-section",
description: "Spec should declare an %install section to place files into the buildroot.",
severity: Severity::Warn,
kind: BuildScriptKind::Install,
message: "spec is missing the %install section",
good_fixture: "Name: x\n%install\n",
bad_fixture: "Name: x\n",
}
pub use build::MissingBuildSection;
pub use install::MissingInstallSection;
pub use prep::MissingPrepSection;