Skip to content

Commit 98710f8

Browse files
committed
DEBUG: ADD UNUSED TYPE
1 parent f243736 commit 98710f8

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/Review/Error.elm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type ErrorFixes
6060
= NoFixes
6161
| Available (Dict String ( Target, List Fix ))
6262
| FailedToApply FixProblem.FixProblem
63+
| Unused FixProblem.FixProblem
6364

6465

6566
fixesFromMaybe : String -> Maybe (List Fix) -> ErrorFixes

src/Review/Rule.elm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,6 +4430,9 @@ errorFixes (Review.Error.ReviewError err) =
44304430
Review.Error.FailedToApply _ ->
44314431
Nothing
44324432

4433+
Review.Error.Unused _ ->
4434+
Nothing
4435+
44334436

44344437
{-| Get the reason why the fix for an error failed when its available automatic fix was attempted and deemed incorrect.
44354438
@@ -4457,6 +4460,9 @@ errorFixFailure (Review.Error.ReviewError err) =
44574460
FixProblem.HasCollisionsInFixRanges ->
44584461
Fix.HasCollisionsInFixRanges
44594462

4463+
Review.Error.Unused _ ->
4464+
Nothing
4465+
44604466

44614467
{-| Get the file path of an [`Error`](#Error).
44624468
-}
@@ -4781,6 +4787,9 @@ qualifyError params (Error err) acc =
47814787

47824788
Review.Error.FailedToApply _ ->
47834789
err.fixes
4790+
4791+
Review.Error.Unused _ ->
4792+
err.fixes
47844793
}
47854794

47864795
else
@@ -5941,6 +5950,9 @@ isFixable predicate (Error err) =
59415950
Review.Error.FailedToApply _ ->
59425951
Nothing
59435952

5953+
Review.Error.Unused _ ->
5954+
Nothing
5955+
59445956

59455957
applySingleModuleFix : ValidProject -> Maybe (Zipper (Graph.NodeContext FilePath ())) -> Error {} -> String -> List InternalFix.Fix -> Result (Error {}) { project : ValidProject, fixedFile : FixedFile }
59465958
applySingleModuleFix project maybeModuleZipper ((Error headError) as err) targetPath fixes =

src/Review/Test.elm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,9 @@ checkFixesAreCorrect (Review.Project.Internal.Project project) ((Error.ReviewErr
17641764
Error.FailedToApply fixProblem ->
17651765
Expect.fail <| FailureMessage.fixProblem_ fixProblem error_
17661766

1767+
Error.Unused _ ->
1768+
Expect.pass
1769+
17671770

17681771
checkFixesMatch : ProjectInternals -> ReviewError -> Dict String String -> List ( String, ( Error.Target, List Fix ) ) -> Expectation
17691772
checkFixesMatch project error_ expectedFixed fixes =

0 commit comments

Comments
 (0)