mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Set arbitraryFileRequest in module rule schema
This commit is contained in:
parent
7460c22e1a
commit
e9285810df
@ -1129,7 +1129,7 @@ fromModuleRuleSchema ((ModuleRuleSchema schema) as moduleVisitor) =
|
||||
, initialProjectContext = initialModuleContext
|
||||
, elmJsonVisitor = compactProjectDataVisitors (Maybe.map .project) schema.elmJsonVisitor
|
||||
, arbitraryFilesVisitor = compactArbitraryFilesVisitor schema.arbitraryFilesVisitor
|
||||
, arbitraryFileRequest = Maybe.map Tuple.second schema.arbitraryFilesVisitor |> Maybe.withDefault []
|
||||
, arbitraryFileRequest = schema.arbitraryFileRequest
|
||||
, readmeVisitor = compactProjectDataVisitors (Maybe.map .content) schema.readmeVisitor
|
||||
, directDependenciesVisitor = compactProjectDataVisitors identity schema.directDependenciesVisitor
|
||||
, dependenciesVisitor = compactProjectDataVisitors identity schema.dependenciesVisitor
|
||||
@ -2364,7 +2364,11 @@ withArbitraryFilesModuleVisitor requestedFiles baseVisitor (ModuleRuleSchema sch
|
||||
visitor files context =
|
||||
baseVisitor (List.filter (globMatch requestedFiles) files) context
|
||||
in
|
||||
ModuleRuleSchema { schema | arbitraryFilesVisitor = Just (combineArbitraryFilesModuleVisitor requestedFiles visitor schema) }
|
||||
ModuleRuleSchema
|
||||
{ schema
|
||||
| arbitraryFilesVisitor = Just (combineArbitraryFilesModuleVisitor requestedFiles visitor schema)
|
||||
, arbitraryFileRequest = requestedFiles ++ schema.arbitraryFileRequest
|
||||
}
|
||||
|
||||
|
||||
combineArbitraryFilesModuleVisitor : ArbitraryFileRequest -> (a -> context -> context) -> { b | arbitraryFilesVisitor : Maybe ( a -> context -> context, ArbitraryFileRequest ) } -> ( a -> context -> context, ArbitraryFileRequest )
|
||||
|
Loading…
Reference in New Issue
Block a user