Add documentation for fix modes

This commit is contained in:
Jeroen Engels 2022-11-04 14:48:46 +01:00
parent 2f3832e4c4
commit c0c8ac4d1a
2 changed files with 12 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,21 +87,29 @@ withIgnoredFixes ignoreFix (ReviewOptionsInternal reviewOptions) =
ReviewOptionsInternal { reviewOptions | ignoreFix = ignoreFix }
{-| Represents whether `elm-review` should apply fixes found in the reported errors.
-}
type alias FixMode =
Internal.FixMode
fixesEnabledWithoutLimits : Internal.FixMode
{-| Apply the fixes for every error whenever possible.
-}
fixesEnabledWithoutLimits : FixMode
fixesEnabledWithoutLimits =
Internal.Enabled Nothing
fixesEnabledWithLimit : Int -> Internal.FixMode
{-| Apply the fixes for every error whenever possible, but abort the whole review process once a number of errors have been fixed.
-}
fixesEnabledWithLimit : Int -> FixMode
fixesEnabledWithLimit limit =
Internal.Enabled (Just limit)
fixedDisabled : Internal.FixMode
{-| Don't apply fixes.
-}
fixedDisabled : FixMode
fixedDisabled =
Internal.Disabled