Add arbitraryFilesVisitor to ProjectRuleSchema

This commit is contained in:
Jeroen Engels 2023-05-30 23:53:26 +02:00
parent 0401257502
commit be80f2b48c

View File

@ -1101,6 +1101,7 @@ fromModuleRuleSchema ((ModuleRuleSchema schema) as moduleVisitor) =
{ name = schema.name
, initialProjectContext = initialModuleContext
, elmJsonVisitor = compactProjectDataVisitors (Maybe.map .project) schema.elmJsonVisitor
, arbitraryFilesVisitor = Nothing
, readmeVisitor = compactProjectDataVisitors (Maybe.map .content) schema.readmeVisitor
, directDependenciesVisitor = compactProjectDataVisitors identity schema.directDependenciesVisitor
, dependenciesVisitor = compactProjectDataVisitors identity schema.dependenciesVisitor
@ -1119,6 +1120,7 @@ fromModuleRuleSchema ((ModuleRuleSchema schema) as moduleVisitor) =
{ name = schema.name
, initialProjectContext = ()
, elmJsonVisitor = Nothing
, arbitraryFilesVisitor = Nothing
, readmeVisitor = Nothing
, directDependenciesVisitor = Nothing
, dependenciesVisitor = Nothing
@ -1161,6 +1163,7 @@ type alias ProjectRuleSchemaData projectContext moduleContext =
{ name : String
, initialProjectContext : projectContext
, elmJsonVisitor : Maybe (Maybe { elmJsonKey : ElmJsonKey, project : Elm.Project.Project } -> projectContext -> ( List (Error {}), projectContext ))
, arbitraryFilesVisitor : Maybe (List { path : String, content : String } -> projectContext -> ( List (Error {}), projectContext ))
, readmeVisitor : Maybe (Maybe { readmeKey : ReadmeKey, content : String } -> projectContext -> ( List (Error {}), projectContext ))
, directDependenciesVisitor : Maybe (Dict String Review.Project.Dependency.Dependency -> projectContext -> ( List (Error {}), projectContext ))
, dependenciesVisitor : Maybe (Dict String Review.Project.Dependency.Dependency -> projectContext -> ( List (Error {}), projectContext ))
@ -1221,6 +1224,7 @@ newProjectRuleSchema name initialProjectContext =
{ name = name
, initialProjectContext = initialProjectContext
, elmJsonVisitor = Nothing
, arbitraryFilesVisitor = Nothing
, readmeVisitor = Nothing
, directDependenciesVisitor = Nothing
, dependenciesVisitor = Nothing