mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-25 02:34:36 +03:00
Rename module rule's phantom fields to canCollectProjectData
This commit is contained in:
parent
0d33ab05e7
commit
c141fdb1ae
@ -516,7 +516,7 @@ take a look at [`withInitialContext`](#withInitialContext) and "with\*" function
|
||||
newModuleRuleSchema :
|
||||
String
|
||||
-> moduleContext
|
||||
-> ModuleRuleSchema { withElmJsonModuleVisitor : (), withDependenciesModuleVisitor : () } moduleContext
|
||||
-> ModuleRuleSchema { canCollectProjectData : () } moduleContext
|
||||
newModuleRuleSchema name_ moduleContext =
|
||||
emptySchema name_ moduleContext
|
||||
|
||||
@ -1671,8 +1671,8 @@ The following example forbids exposing a file in an "Internal" directory in your
|
||||
-}
|
||||
withElmJsonModuleVisitor :
|
||||
(Maybe Elm.Project.Project -> moduleContext -> moduleContext)
|
||||
-> ModuleRuleSchema { anything | withElmJsonModuleVisitor : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | withElmJsonModuleVisitor : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | canCollectProjectData : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | canCollectProjectData : () } moduleContext
|
||||
withElmJsonModuleVisitor visitor (ModuleRuleSchema schema) =
|
||||
ModuleRuleSchema { schema | elmJsonVisitors = visitor :: schema.elmJsonVisitors }
|
||||
|
||||
@ -1681,8 +1681,8 @@ withElmJsonModuleVisitor visitor (ModuleRuleSchema schema) =
|
||||
-}
|
||||
withDependenciesModuleVisitor :
|
||||
(Dict String Review.Project.Dependency.Dependency -> moduleContext -> moduleContext)
|
||||
-> ModuleRuleSchema { anything | withDependenciesModuleVisitor : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | withDependenciesModuleVisitor : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | canCollectProjectData : () } moduleContext
|
||||
-> ModuleRuleSchema { anything | canCollectProjectData : () } moduleContext
|
||||
withDependenciesModuleVisitor visitor (ModuleRuleSchema schema) =
|
||||
ModuleRuleSchema { schema | dependenciesVisitors = visitor :: schema.dependenciesVisitors }
|
||||
|
||||
|
@ -83,8 +83,8 @@ emptyScope =
|
||||
|
||||
|
||||
addVisitors :
|
||||
Rule.ModuleRuleSchema { anything | withDependenciesModuleVisitor : () } { context | scope : Context }
|
||||
-> Rule.ModuleRuleSchema { anything | withDependenciesModuleVisitor : (), hasAtLeastOneVisitor : () } { context | scope : Context }
|
||||
Rule.ModuleRuleSchema { anything | canCollectProjectData : () } { context | scope : Context }
|
||||
-> Rule.ModuleRuleSchema { anything | canCollectProjectData : (), hasAtLeastOneVisitor : () } { context | scope : Context }
|
||||
addVisitors schema =
|
||||
schema
|
||||
|> Rule.withDependenciesModuleVisitor
|
||||
|
@ -33,8 +33,7 @@ testRule rule string =
|
||||
baseRule :
|
||||
Rule.ModuleRuleSchema
|
||||
{ hasAtLeastOneVisitor : ()
|
||||
, withDependenciesModuleVisitor : ()
|
||||
, withElmJsonModuleVisitor : ()
|
||||
, canCollectProjectData : ()
|
||||
}
|
||||
Context
|
||||
baseRule =
|
||||
|
Loading…
Reference in New Issue
Block a user