From 155b6c6f236bd3aac15895881e6835cc11e2d91e Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Tue, 18 Oct 2022 00:04:52 +0200 Subject: [PATCH] Add provides information to rules in tests --- tests/Docs/UpToDateReadmeLinks.elm | 1 + tests/NoDebug/Log.elm | 1 + tests/NoExposingEverything.elm | 1 + tests/NoInconsistentAliases/Visitor.elm | 1 + tests/NoMissingTypeExpose.elm | 1 + tests/NoModuleOnExposedNames.elm | 1 + tests/NoNegationInIfCondition.elm | 1 + tests/NoPrematureLetComputation.elm | 1 + tests/NoRedundantConcat.elm | 1 + tests/NoSimpleLetBody.elm | 1 + tests/NoUnused/Parameters.elm | 1 + tests/Simplify.elm | 1 + 12 files changed, 12 insertions(+) diff --git a/tests/Docs/UpToDateReadmeLinks.elm b/tests/Docs/UpToDateReadmeLinks.elm index 0d922925..56a0f384 100644 --- a/tests/Docs/UpToDateReadmeLinks.elm +++ b/tests/Docs/UpToDateReadmeLinks.elm @@ -54,6 +54,7 @@ rule = Rule.newProjectRuleSchema "Docs.UpToDateReadmeLinks" initialProjectContext |> Rule.withElmJsonProjectVisitor elmJsonVisitor |> Rule.withReadmeProjectVisitor readmeVisitor + |> Rule.providesFixesForProjectRule |> Rule.fromProjectRuleSchema diff --git a/tests/NoDebug/Log.elm b/tests/NoDebug/Log.elm index 5b7dbf2a..77b907e6 100644 --- a/tests/NoDebug/Log.elm +++ b/tests/NoDebug/Log.elm @@ -68,6 +68,7 @@ rule : Rule rule = Rule.newModuleRuleSchemaUsingContextCreator "NoDebug.Log" initContext |> Rule.withExpressionEnterVisitor expressionVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoExposingEverything.elm b/tests/NoExposingEverything.elm index c2b3b51c..98eb64d2 100644 --- a/tests/NoExposingEverything.elm +++ b/tests/NoExposingEverything.elm @@ -61,6 +61,7 @@ rule = Rule.newModuleRuleSchema "NoExposingEverything" ExposingOk |> Rule.withModuleDefinitionVisitor moduleDefinitionVisitor |> Rule.withDeclarationListVisitor declarationListVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoInconsistentAliases/Visitor.elm b/tests/NoInconsistentAliases/Visitor.elm index 5d0d1961..bd94f5fa 100644 --- a/tests/NoInconsistentAliases/Visitor.elm +++ b/tests/NoInconsistentAliases/Visitor.elm @@ -25,6 +25,7 @@ rule config = |> Rule.withImportVisitor (importVisitor options) |> NameVisitor.withNameVisitor moduleCallVisitor |> Rule.withFinalModuleEvaluation (finalEvaluation options.lookupAlias) + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoMissingTypeExpose.elm b/tests/NoMissingTypeExpose.elm index f96cb547..8154c748 100644 --- a/tests/NoMissingTypeExpose.elm +++ b/tests/NoMissingTypeExpose.elm @@ -96,6 +96,7 @@ rule = , fromModuleToProject = fromModuleToProjectContext , foldProjectContexts = foldProjectContexts } + |> Rule.providesFixesForProjectRule |> Rule.fromProjectRuleSchema diff --git a/tests/NoModuleOnExposedNames.elm b/tests/NoModuleOnExposedNames.elm index 9b3d6b62..0f657a3f 100644 --- a/tests/NoModuleOnExposedNames.elm +++ b/tests/NoModuleOnExposedNames.elm @@ -97,6 +97,7 @@ rule = { valueVisitor = valueVisitor , typeVisitor = typeVisitor } + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoNegationInIfCondition.elm b/tests/NoNegationInIfCondition.elm index 5b1558da..99740040 100644 --- a/tests/NoNegationInIfCondition.elm +++ b/tests/NoNegationInIfCondition.elm @@ -54,6 +54,7 @@ rule : Rule rule = Rule.newModuleRuleSchemaUsingContextCreator "NoNegationInIfCondition" initialContext |> Rule.withExpressionEnterVisitor expressionVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoPrematureLetComputation.elm b/tests/NoPrematureLetComputation.elm index de4bb0d8..cd33bb0b 100644 --- a/tests/NoPrematureLetComputation.elm +++ b/tests/NoPrematureLetComputation.elm @@ -155,6 +155,7 @@ rule = |> Rule.withDeclarationEnterVisitor declarationVisitor |> Rule.withExpressionEnterVisitor expressionEnterVisitor |> Rule.withExpressionExitVisitor expressionExitVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoRedundantConcat.elm b/tests/NoRedundantConcat.elm index a4f8cfef..f4a1c500 100644 --- a/tests/NoRedundantConcat.elm +++ b/tests/NoRedundantConcat.elm @@ -46,6 +46,7 @@ rule : Rule rule = Rule.newModuleRuleSchema "NoRedundantConcat" () |> Rule.withSimpleExpressionVisitor expressionVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoSimpleLetBody.elm b/tests/NoSimpleLetBody.elm index 5044db7c..d18be049 100644 --- a/tests/NoSimpleLetBody.elm +++ b/tests/NoSimpleLetBody.elm @@ -81,6 +81,7 @@ rule : Rule rule = Rule.newModuleRuleSchema "NoSimpleLetBody" () |> Rule.withSimpleExpressionVisitor expressionVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/NoUnused/Parameters.elm b/tests/NoUnused/Parameters.elm index cafc2337..061dc431 100644 --- a/tests/NoUnused/Parameters.elm +++ b/tests/NoUnused/Parameters.elm @@ -78,6 +78,7 @@ rule = |> Rule.withExpressionExitVisitor expressionExitVisitor |> Rule.withLetDeclarationEnterVisitor letDeclarationEnterVisitor |> Rule.withLetDeclarationExitVisitor letDeclarationExitVisitor + |> Rule.providesFixesForModuleRule |> Rule.fromModuleRuleSchema diff --git a/tests/Simplify.elm b/tests/Simplify.elm index 4c092d99..76f7a086 100644 --- a/tests/Simplify.elm +++ b/tests/Simplify.elm @@ -603,6 +603,7 @@ rule (Configuration config) = , fromModuleToProject = fromModuleToProject , foldProjectContexts = \_ previous -> previous } + |> Rule.providesFixesForProjectRule |> Rule.fromProjectRuleSchema