Trait selene_lib::lints::Lint

source ·
pub trait Lint {
    type Config: DeserializeOwned;
    type Error: Error;

    const SEVERITY: Severity;
    const LINT_TYPE: LintType;

    // Required methods
    fn new(config: Self::Config) -> Result<Self, Self::Error>
       where Self: Sized;
    fn pass(
        &self,
        ast: &Ast,
        context: &Context,
        ast_context: &AstContext
    ) -> Vec<Diagnostic>;
}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

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

source

fn pass( &self, ast: &Ast, context: &Context, ast_context: &AstContext ) -> Vec<Diagnostic>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Lint for AlmostSwappedLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for BadStringEscapeLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for CompareNanLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for ConstantTableComparisonLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for DeprecatedLint

§

type Config = DeprecatedLintConfig

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for DivideByZeroLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Complexity

source§

impl Lint for DuplicateKeysLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for EmptyIfLint

§

type Config = EmptyIfLintConfig

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style

source§

impl Lint for EmptyLoopLint

§

type Config = EmptyLoopLintConfig

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style

source§

impl Lint for GlobalLint

§

type Config = GlobalConfig

§

type Error = Error

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Complexity

source§

impl Lint for HighCyclomaticComplexityLint

source§

impl Lint for IfSameThenElseLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for IfsSameCondLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for InvalidLintFilterLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for ManualTableCloneLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Complexity

source§

impl Lint for MismatchedArgCountLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for MixedTableLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for MultipleStatementsLint

§

type Config = MultipleStatementsConfig

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style

source§

impl Lint for MustUseLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for ParentheseConditionsLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style

source§

impl Lint for Color3BoundsLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for IncorrectRoactUsageLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for SuspiciousUDim2NewLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for ShadowingLint

§

type Config = ShadowingConfig

§

type Error = Error

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style

source§

impl Lint for StandardLibraryLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for SuspiciousReverseLoopLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for TypeCheckInsideCallLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for UnbalancedAssignmentsLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Complexity

source§

impl Lint for UndefinedVariableLint

§

type Config = ()

§

type Error = Infallible

source§

const SEVERITY: Severity = Severity::Error

source§

const LINT_TYPE: LintType = LintType::Correctness

source§

impl Lint for UnscopedVariablesLint

§

type Config = UnscopedVariablesConfig

§

type Error = Error

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Complexity

source§

impl Lint for UnusedVariableLint

§

type Config = UnusedVariableConfig

§

type Error = Error

source§

const SEVERITY: Severity = Severity::Warning

source§

const LINT_TYPE: LintType = LintType::Style