[][src]Trait selene_lib::rules::Rule

pub trait Rule {
    type Config: DeserializeOwned;
    type Error: Error;
    pub fn new(config: Self::Config) -> Result<Self, Self::Error>
    where
        Self: Sized
;
pub fn pass(&self, ast: &Ast<'static>, context: &Context) -> Vec<Diagnostic>;
pub fn severity(&self) -> Severity;
pub fn rule_type(&self) -> RuleType; }

Associated Types

Loading content...

Required methods

pub fn new(config: Self::Config) -> Result<Self, Self::Error> where
    Self: Sized
[src]

pub fn pass(&self, ast: &Ast<'static>, context: &Context) -> Vec<Diagnostic>[src]

pub fn severity(&self) -> Severity[src]

pub fn rule_type(&self) -> RuleType[src]

Loading content...

Implementors

impl Rule for AlmostSwappedLint[src]

type Config = ()

type Error = Infallible

impl Rule for BadStringEscapeLint[src]

type Config = ()

type Error = Infallible

impl Rule for CompareNanLint[src]

type Config = ()

type Error = Infallible

impl Rule for DivideByZeroLint[src]

type Config = ()

type Error = Infallible

impl Rule for EmptyIfLint[src]

type Config = EmptyIfLintConfig

type Error = Infallible

impl Rule for GlobalLint[src]

type Config = ()

type Error = Infallible

impl Rule for IfSameThenElseLint[src]

type Config = ()

type Error = Infallible

impl Rule for IfsSameCondLint[src]

type Config = ()

type Error = Infallible

impl Rule for InvalidLintFilterLint[src]

type Config = ()

type Error = Infallible

impl Rule for MultipleStatementsLint[src]

type Config = MultipleStatementsConfig

type Error = Infallible

impl Rule for ParentheseConditionsLint[src]

type Config = ()

type Error = Infallible

impl Rule for Color3BoundsLint[src]

type Config = ()

type Error = Infallible

impl Rule for IncorrectRoactUsageLint[src]

type Config = ()

type Error = Infallible

impl Rule for ShadowingLint[src]

type Config = ShadowingConfig

type Error = Error

impl Rule for StandardLibraryLint[src]

type Config = ()

type Error = Infallible

impl Rule for SuspiciousReverseLoopLint[src]

type Config = ()

type Error = Infallible

impl Rule for TypeCheckInsideCallLint[src]

type Config = ()

type Error = Infallible

impl Rule for UnbalancedAssignmentsLint[src]

type Config = ()

type Error = Infallible

impl Rule for UndefinedVariableLint[src]

type Config = ()

type Error = Infallible

impl Rule for UnscopedVariablesLint[src]

type Config = UnscopedVariablesConfig

type Error = Error

impl Rule for UnusedVariableLint[src]

type Config = UnusedVariableConfig

type Error = Error

Loading content...