Add provides information to rules in tests

This commit is contained in:
Jeroen Engels 2022-10-18 00:04:52 +02:00
parent f164cecdf2
commit 155b6c6f23
12 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,7 @@ rule =
Rule.newProjectRuleSchema "Docs.UpToDateReadmeLinks" initialProjectContext Rule.newProjectRuleSchema "Docs.UpToDateReadmeLinks" initialProjectContext
|> Rule.withElmJsonProjectVisitor elmJsonVisitor |> Rule.withElmJsonProjectVisitor elmJsonVisitor
|> Rule.withReadmeProjectVisitor readmeVisitor |> Rule.withReadmeProjectVisitor readmeVisitor
|> Rule.providesFixesForProjectRule
|> Rule.fromProjectRuleSchema |> Rule.fromProjectRuleSchema

View File

@ -68,6 +68,7 @@ rule : Rule
rule = rule =
Rule.newModuleRuleSchemaUsingContextCreator "NoDebug.Log" initContext Rule.newModuleRuleSchemaUsingContextCreator "NoDebug.Log" initContext
|> Rule.withExpressionEnterVisitor expressionVisitor |> Rule.withExpressionEnterVisitor expressionVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -61,6 +61,7 @@ rule =
Rule.newModuleRuleSchema "NoExposingEverything" ExposingOk Rule.newModuleRuleSchema "NoExposingEverything" ExposingOk
|> Rule.withModuleDefinitionVisitor moduleDefinitionVisitor |> Rule.withModuleDefinitionVisitor moduleDefinitionVisitor
|> Rule.withDeclarationListVisitor declarationListVisitor |> Rule.withDeclarationListVisitor declarationListVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -25,6 +25,7 @@ rule config =
|> Rule.withImportVisitor (importVisitor options) |> Rule.withImportVisitor (importVisitor options)
|> NameVisitor.withNameVisitor moduleCallVisitor |> NameVisitor.withNameVisitor moduleCallVisitor
|> Rule.withFinalModuleEvaluation (finalEvaluation options.lookupAlias) |> Rule.withFinalModuleEvaluation (finalEvaluation options.lookupAlias)
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -96,6 +96,7 @@ rule =
, fromModuleToProject = fromModuleToProjectContext , fromModuleToProject = fromModuleToProjectContext
, foldProjectContexts = foldProjectContexts , foldProjectContexts = foldProjectContexts
} }
|> Rule.providesFixesForProjectRule
|> Rule.fromProjectRuleSchema |> Rule.fromProjectRuleSchema

View File

@ -97,6 +97,7 @@ rule =
{ valueVisitor = valueVisitor { valueVisitor = valueVisitor
, typeVisitor = typeVisitor , typeVisitor = typeVisitor
} }
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -54,6 +54,7 @@ rule : Rule
rule = rule =
Rule.newModuleRuleSchemaUsingContextCreator "NoNegationInIfCondition" initialContext Rule.newModuleRuleSchemaUsingContextCreator "NoNegationInIfCondition" initialContext
|> Rule.withExpressionEnterVisitor expressionVisitor |> Rule.withExpressionEnterVisitor expressionVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -155,6 +155,7 @@ rule =
|> Rule.withDeclarationEnterVisitor declarationVisitor |> Rule.withDeclarationEnterVisitor declarationVisitor
|> Rule.withExpressionEnterVisitor expressionEnterVisitor |> Rule.withExpressionEnterVisitor expressionEnterVisitor
|> Rule.withExpressionExitVisitor expressionExitVisitor |> Rule.withExpressionExitVisitor expressionExitVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -46,6 +46,7 @@ rule : Rule
rule = rule =
Rule.newModuleRuleSchema "NoRedundantConcat" () Rule.newModuleRuleSchema "NoRedundantConcat" ()
|> Rule.withSimpleExpressionVisitor expressionVisitor |> Rule.withSimpleExpressionVisitor expressionVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -81,6 +81,7 @@ rule : Rule
rule = rule =
Rule.newModuleRuleSchema "NoSimpleLetBody" () Rule.newModuleRuleSchema "NoSimpleLetBody" ()
|> Rule.withSimpleExpressionVisitor expressionVisitor |> Rule.withSimpleExpressionVisitor expressionVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -78,6 +78,7 @@ rule =
|> Rule.withExpressionExitVisitor expressionExitVisitor |> Rule.withExpressionExitVisitor expressionExitVisitor
|> Rule.withLetDeclarationEnterVisitor letDeclarationEnterVisitor |> Rule.withLetDeclarationEnterVisitor letDeclarationEnterVisitor
|> Rule.withLetDeclarationExitVisitor letDeclarationExitVisitor |> Rule.withLetDeclarationExitVisitor letDeclarationExitVisitor
|> Rule.providesFixesForModuleRule
|> Rule.fromModuleRuleSchema |> Rule.fromModuleRuleSchema

View File

@ -603,6 +603,7 @@ rule (Configuration config) =
, fromModuleToProject = fromModuleToProject , fromModuleToProject = fromModuleToProject
, foldProjectContexts = \_ previous -> previous , foldProjectContexts = \_ previous -> previous
} }
|> Rule.providesFixesForProjectRule
|> Rule.fromProjectRuleSchema |> Rule.fromProjectRuleSchema