mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-19 03:57:20 +03:00
Rename NotNeeded phantom type to Forbidden
This commit is contained in:
parent
097dbdb7b0
commit
9a983f1190
@ -10,7 +10,7 @@ The argument is:
|
|||||||
Rule.ProjectRuleSchema
|
Rule.ProjectRuleSchema
|
||||||
()
|
()
|
||||||
moduleContext
|
moduleContext
|
||||||
{ canAddModuleVisitor : (), withModuleContext : Rule.NotNeeded }
|
{ canAddModuleVisitor : (), withModuleContext : Rule.Forbidden }
|
||||||
|
|
||||||
But (|>) is piping it to a function that expects:
|
But (|>) is piping it to a function that expects:
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ But (|>) is piping it to a function that expects:
|
|||||||
{ a
|
{ a
|
||||||
| canAddModuleVisitor : ()
|
| canAddModuleVisitor : ()
|
||||||
, hasAtLeastOneVisitor : ()
|
, hasAtLeastOneVisitor : ()
|
||||||
, withModuleContext : Rule.NotNeeded
|
, withModuleContext : Rule.Forbidden
|
||||||
}
|
}
|
||||||
|
|
||||||
Hint: Seems like a record field typo. Maybe hasAtLeastOneVisitor should be
|
Hint: Seems like a record field typo. Maybe hasAtLeastOneVisitor should be
|
||||||
|
@ -14,7 +14,7 @@ The argument is:
|
|||||||
Rule.ProjectRuleSchema
|
Rule.ProjectRuleSchema
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
{ canAddModuleVisitor : (), withModuleContext : Rule.NotNeeded }
|
{ canAddModuleVisitor : (), withModuleContext : Rule.Forbidden }
|
||||||
|
|
||||||
But (|>) is piping it to a function that expects:
|
But (|>) is piping it to a function that expects:
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ The argument is:
|
|||||||
Rule.ProjectRuleSchema
|
Rule.ProjectRuleSchema
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
{ hasAtLeastOneVisitor : (), withModuleContext : Rule.NotNeeded }
|
{ hasAtLeastOneVisitor : (), withModuleContext : Rule.Forbidden }
|
||||||
|
|
||||||
But (|>) is piping it to a function that expects:
|
But (|>) is piping it to a function that expects:
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ But (|>) is piping it to a function that expects:
|
|||||||
{ a
|
{ a
|
||||||
| canAddModuleVisitor : ()
|
| canAddModuleVisitor : ()
|
||||||
, hasAtLeastOneVisitor : ()
|
, hasAtLeastOneVisitor : ()
|
||||||
, withModuleContext : Rule.NotNeeded
|
, withModuleContext : Rule.Forbidden
|
||||||
}
|
}
|
||||||
|
|
||||||
Hint: Seems like a record field typo. Maybe canAddModuleVisitor should be
|
Hint: Seems like a record field typo. Maybe canAddModuleVisitor should be
|
||||||
|
@ -11,7 +11,7 @@ The argument is:
|
|||||||
Rule.ProjectRuleSchema
|
Rule.ProjectRuleSchema
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
{ canAddModuleVisitor : (), withModuleContext : Rule.NotNeeded }
|
{ canAddModuleVisitor : (), withModuleContext : Rule.Forbidden }
|
||||||
|
|
||||||
But (|>) is piping it to a function that expects:
|
But (|>) is piping it to a function that expects:
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ But (|>) is piping it to a function that expects:
|
|||||||
{ a
|
{ a
|
||||||
| canAddModuleVisitor : ()
|
| canAddModuleVisitor : ()
|
||||||
, hasAtLeastOneVisitor : ()
|
, hasAtLeastOneVisitor : ()
|
||||||
, withModuleContext : Rule.NotNeeded
|
, withModuleContext : Rule.Forbidden
|
||||||
}
|
}
|
||||||
|
|
||||||
Hint: Seems like a record field typo. Maybe hasAtLeastOneVisitor should be
|
Hint: Seems like a record field typo. Maybe hasAtLeastOneVisitor should be
|
||||||
|
@ -20,7 +20,7 @@ The argument is:
|
|||||||
Rule.ProjectRuleSchema
|
Rule.ProjectRuleSchema
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
{ hasAtLeastOneVisitor : (), withModuleContext : Rule.NotNeeded }
|
{ hasAtLeastOneVisitor : (), withModuleContext : Rule.Forbidden }
|
||||||
|
|
||||||
But (|>) is piping it to a function that expects:
|
But (|>) is piping it to a function that expects:
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ module Review.Rule exposing
|
|||||||
, withFixes
|
, withFixes
|
||||||
, ignoreErrorsForDirectories, ignoreErrorsForFiles
|
, ignoreErrorsForDirectories, ignoreErrorsForFiles
|
||||||
, review
|
, review
|
||||||
, Required, NotNeeded
|
, Required, Forbidden
|
||||||
)
|
)
|
||||||
|
|
||||||
{-| This module contains functions that are used for writing rules.
|
{-| This module contains functions that are used for writing rules.
|
||||||
@ -235,7 +235,7 @@ reason or seemingly inappropriately.
|
|||||||
|
|
||||||
# Internals
|
# Internals
|
||||||
|
|
||||||
@docs Required, NotNeeded
|
@docs Required, Forbidden
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ You can't use [`withElmJsonModuleVisitor`](#withElmJsonModuleVisitor) or [`withD
|
|||||||
in project rules. Instead, you should use [`withElmJsonProjectVisitor`](#withElmJsonProjectVisitor) or [`withDependenciesProjectVisitor`](#withDependenciesProjectVisitor).
|
in project rules. Instead, you should use [`withElmJsonProjectVisitor`](#withElmJsonProjectVisitor) or [`withDependenciesProjectVisitor`](#withDependenciesProjectVisitor).
|
||||||
|
|
||||||
-}
|
-}
|
||||||
newProjectRuleSchema : String -> projectContext -> ProjectRuleSchema projectContext moduleContext { canAddModuleVisitor : (), withModuleContext : NotNeeded }
|
newProjectRuleSchema : String -> projectContext -> ProjectRuleSchema projectContext moduleContext { canAddModuleVisitor : (), withModuleContext : Forbidden }
|
||||||
newProjectRuleSchema name_ initialProjectContext =
|
newProjectRuleSchema name_ initialProjectContext =
|
||||||
ProjectRuleSchema
|
ProjectRuleSchema
|
||||||
{ name = name_
|
{ name = name_
|
||||||
@ -966,7 +966,7 @@ newProjectRuleSchema name_ initialProjectContext =
|
|||||||
|
|
||||||
{-| Create a [`Rule`](#Rule) from a configured [`ProjectRuleSchema`](#ProjectRuleSchema).
|
{-| Create a [`Rule`](#Rule) from a configured [`ProjectRuleSchema`](#ProjectRuleSchema).
|
||||||
-}
|
-}
|
||||||
fromProjectRuleSchema : ProjectRuleSchema projectContext moduleContext { schemaState | withModuleContext : NotNeeded, hasAtLeastOneVisitor : () } -> Rule
|
fromProjectRuleSchema : ProjectRuleSchema projectContext moduleContext { schemaState | withModuleContext : Forbidden, hasAtLeastOneVisitor : () } -> Rule
|
||||||
fromProjectRuleSchema (ProjectRuleSchema schema) =
|
fromProjectRuleSchema (ProjectRuleSchema schema) =
|
||||||
Rule schema.name
|
Rule schema.name
|
||||||
Exceptions.init
|
Exceptions.init
|
||||||
@ -1015,8 +1015,8 @@ type Required
|
|||||||
|
|
||||||
{-| Used for phantom type constraints. You can safely ignore this type.
|
{-| Used for phantom type constraints. You can safely ignore this type.
|
||||||
-}
|
-}
|
||||||
type NotNeeded
|
type Forbidden
|
||||||
= NotNeeded
|
= Forbidden
|
||||||
|
|
||||||
|
|
||||||
{-| TODO Documentation
|
{-| TODO Documentation
|
||||||
@ -1027,7 +1027,7 @@ withModuleContext :
|
|||||||
, foldProjectContexts : projectContext -> projectContext -> projectContext
|
, foldProjectContexts : projectContext -> projectContext -> projectContext
|
||||||
}
|
}
|
||||||
-> ProjectRuleSchema projectContext moduleContext { schemaState | canAddModuleVisitor : (), withModuleContext : Required }
|
-> ProjectRuleSchema projectContext moduleContext { schemaState | canAddModuleVisitor : (), withModuleContext : Required }
|
||||||
-> ProjectRuleSchema projectContext moduleContext { schemaState | hasAtLeastOneVisitor : (), withModuleContext : NotNeeded }
|
-> ProjectRuleSchema projectContext moduleContext { schemaState | hasAtLeastOneVisitor : (), withModuleContext : Forbidden }
|
||||||
withModuleContext moduleContext (ProjectRuleSchema schema) =
|
withModuleContext moduleContext (ProjectRuleSchema schema) =
|
||||||
let
|
let
|
||||||
visitors : List (ModuleRuleSchema {} moduleContext -> ModuleRuleSchema { hasAtLeastOneVisitor : () } moduleContext)
|
visitors : List (ModuleRuleSchema {} moduleContext -> ModuleRuleSchema { hasAtLeastOneVisitor : () } moduleContext)
|
||||||
|
Loading…
Reference in New Issue
Block a user