mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Add withArbitraryFilesModuleVisitor
This commit is contained in:
parent
a6298e737d
commit
f05deb520c
@ -14,6 +14,7 @@ module Review.Rule exposing
|
||||
, providesFixesForModuleRule
|
||||
, withFinalModuleEvaluation
|
||||
, withElmJsonModuleVisitor, withReadmeModuleVisitor, withDirectDependenciesModuleVisitor, withDependenciesModuleVisitor
|
||||
, withArbitraryFilesModuleVisitor
|
||||
, ProjectRuleSchema, newProjectRuleSchema, fromProjectRuleSchema, withModuleVisitor, withModuleContext, withModuleContextUsingContextCreator, withElmJsonProjectVisitor, withReadmeProjectVisitor, withDirectDependenciesProjectVisitor, withDependenciesProjectVisitor, withFinalProjectEvaluation, withContextFromImportedModules
|
||||
, providesFixesForProjectRule
|
||||
, ContextCreator, initContextCreator, withModuleName, withModuleNameNode, withIsInSourceDirectories, withFilePath, withIsFileIgnored, withModuleNameLookupTable, withModuleKey, withSourceCodeExtractor, withFullAst, withModuleDocumentation
|
||||
@ -211,6 +212,7 @@ Evaluating/visiting a node means two things:
|
||||
## Builder functions to analyze the project's data
|
||||
|
||||
@docs withElmJsonModuleVisitor, withReadmeModuleVisitor, withDirectDependenciesModuleVisitor, withDependenciesModuleVisitor
|
||||
@docs withArbitraryFilesModuleVisitor
|
||||
|
||||
|
||||
## Creating a project rule
|
||||
@ -2288,6 +2290,17 @@ withElmJsonModuleVisitor visitor (ModuleRuleSchema schema) =
|
||||
ModuleRuleSchema { schema | elmJsonVisitor = Just (combineContextOnlyVisitor visitor schema.elmJsonVisitor) }
|
||||
|
||||
|
||||
{-| Add a visitor to the [`ModuleRuleSchema`](#ModuleRuleSchema) which will visit
|
||||
the project's `README.md` file.
|
||||
-}
|
||||
withArbitraryFilesModuleVisitor :
|
||||
(List { path : String, content : String } -> moduleContext -> moduleContext)
|
||||
-> ModuleRuleSchema { schemaState | canCollectProjectData : () } moduleContext
|
||||
-> ModuleRuleSchema { schemaState | canCollectProjectData : () } moduleContext
|
||||
withArbitraryFilesModuleVisitor visitor (ModuleRuleSchema schema) =
|
||||
ModuleRuleSchema { schema | arbitraryFilesVisitor = Just (combineContextOnlyVisitor visitor schema.arbitraryFilesVisitor) }
|
||||
|
||||
|
||||
{-| Add a visitor to the [`ModuleRuleSchema`](#ModuleRuleSchema) which will visit
|
||||
the project's `README.md` file.
|
||||
-}
|
||||
|
Loading…
Reference in New Issue
Block a user