pub enum LintSetting {
Allow,
Warn,
Deny,
}Expand description
Author-declared level for one lint kind or group — the Blueprint
analogue of rustc’s #[allow] / #[warn] / #[deny] attributes.
Declared in a lints map on two Blueprint layers
(BlueprintMetadata::lints Blueprint-wide, AgentDef::lints
per-agent); bp_doctor supplies a third call-site layer at request
time and is the consumer that resolves all three (the resolver lives
in the mlua-swarm-diag crate, which carries its own twin of this
enum so it stays free of schema dependencies).
A map key selects what the setting applies to:
| key form | selects |
|---|---|
"agent-md-size" | one stable lint kind literal from the diag crate’s registry |
"category:style" | every kind in one category (correctness / suspicious / style / contract / migration) |
"all" | every kind |
Keys are validated at consumption time, not at parse time: a key that
matches nothing surfaces as the unknown-lint-kind meta-lint
(rustc’s unknown_lints analogue) rather than failing the register.
Values are typed, so an unrecognized value is a serde error
(fail-loud on the spelling the author controls exhaustively).
Resolution: the most specific layer that has any matching key wins
outright — call-site, then agent, then Blueprint, then the kind’s
registry default level (rustc’s attribute-proximity model, no merging
across layers). Within one layer, an exact kind key beats
category:<cat>, which beats all.
The non-suppressible boundary is stage-scoped: compile-stage hard
errors ignore allow / warn at compile, but a kind that also
fires at bp_doctor (at Warn) stays suppressible there. Targeting
a kind that only exists as a compile hard error by exact kind
literal raises the non-suppressible-lint meta-lint at bp_doctor.
Variants§
Allow
Suppress the lint: bp_doctor moves the finding into its
suppressed[] array instead of diagnostics[], and it no longer
folds into the verdict (omitted ≠ passed — the finding stays
visible).
Warn
Report the lint as an advisory (WARN band).
Deny
Escalate the lint to an error (BLOCK band in the bp_doctor
verdict). The verdict remains a report label — bp_doctor still
blocks nothing.
Trait Implementations§
Source§impl Clone for LintSetting
impl Clone for LintSetting
Source§fn clone(&self) -> LintSetting
fn clone(&self) -> LintSetting
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LintSetting
Source§impl Debug for LintSetting
impl Debug for LintSetting
Source§impl<'de> Deserialize<'de> for LintSetting
impl<'de> Deserialize<'de> for LintSetting
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LintSetting
Source§impl JsonSchema for LintSetting
impl JsonSchema for LintSetting
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for LintSetting
impl PartialEq for LintSetting
Source§impl Serialize for LintSetting
impl Serialize for LintSetting
impl StructuralPartialEq for LintSetting
Auto Trait Implementations§
impl Freeze for LintSetting
impl RefUnwindSafe for LintSetting
impl Send for LintSetting
impl Sync for LintSetting
impl Unpin for LintSetting
impl UnsafeUnpin for LintSetting
impl UnwindSafe for LintSetting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more