pub struct Namespace(/* private fields */);Expand description
Where a rule came from.
Open at the syntax level and closed at the config level, which is not the same thing as
being open. Parsing accepts any well-formed namespace so that a team can group its rules
under its own name — pera/no-numeric-sizes rather than a local/ bucket shared with
everything else. What keeps a typo from becoming a valid-but-inert ID is that the config
refuses a namespace nobody declared: lanekep/foo fails at load, naming the namespaces
that do exist.
lanekeep stays reserved for rules shipped here, so a rule’s origin is still readable
from its ID alone — the property §14.1 locked in.
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub const LANEKEEP: &'static str = "lanekeep"
pub const LANEKEEP: &'static str = "lanekeep"
Rules shipped with lanekeep and reviewed by a maintainer.
Sourcepub const LOCAL: &'static str = "local"
pub const LOCAL: &'static str = "local"
The default for rules authored in the project being checked.
Sourcepub fn is_built_in(&self) -> bool
pub fn is_built_in(&self) -> bool
Whether this is one of the two lanekeep defines, which never need declaring.
Sourcepub fn is_lanekeep(&self) -> bool
pub fn is_lanekeep(&self) -> bool
Whether this is the reserved namespace for rules shipped with lanekeep.