File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ type ErrorFixes
60
60
= NoFixes
61
61
| Available ( Dict String ( Target , List Fix ))
62
62
| FailedToApply FixProblem . FixProblem
63
+ | Unused FixProblem . FixProblem
63
64
64
65
65
66
fixesFromMaybe : String -> Maybe (List Fix ) -> ErrorFixes
Original file line number Diff line number Diff line change @@ -4430,6 +4430,9 @@ errorFixes (Review.Error.ReviewError err) =
4430
4430
Review . Error . FailedToApply _ ->
4431
4431
Nothing
4432
4432
4433
+ Review . Error . Unused _ ->
4434
+ Nothing
4435
+
4433
4436
4434
4437
{- | Get the reason why the fix for an error failed when its available automatic fix was attempted and deemed incorrect.
4435
4438
@@ -4457,6 +4460,9 @@ errorFixFailure (Review.Error.ReviewError err) =
4457
4460
FixProblem . HasCollisionsInFixRanges ->
4458
4461
Fix . HasCollisionsInFixRanges
4459
4462
4463
+ Review . Error . Unused _ ->
4464
+ Nothing
4465
+
4460
4466
4461
4467
{- | Get the file path of an [`Error`](#Error).
4462
4468
-}
@@ -4781,6 +4787,9 @@ qualifyError params (Error err) acc =
4781
4787
4782
4788
Review . Error . FailedToApply _ ->
4783
4789
err. fixes
4790
+
4791
+ Review . Error . Unused _ ->
4792
+ err. fixes
4784
4793
}
4785
4794
4786
4795
else
@@ -5941,6 +5950,9 @@ isFixable predicate (Error err) =
5941
5950
Review . Error . FailedToApply _ ->
5942
5951
Nothing
5943
5952
5953
+ Review . Error . Unused _ ->
5954
+ Nothing
5955
+
5944
5956
5945
5957
applySingleModuleFix : ValidProject -> Maybe (Zipper (Graph .NodeContext FilePath () )) -> Error {} -> String -> List InternalFix .Fix -> Result (Error {}) { project : ValidProject , fixedFile : FixedFile }
5946
5958
applySingleModuleFix project maybeModuleZipper (( Error headError) as err) targetPath fixes =
Original file line number Diff line number Diff line change @@ -1764,6 +1764,9 @@ checkFixesAreCorrect (Review.Project.Internal.Project project) ((Error.ReviewErr
1764
1764
Error . FailedToApply fixProblem ->
1765
1765
Expect . fail <| FailureMessage . fixProblem_ fixProblem error_
1766
1766
1767
+ Error . Unused _ ->
1768
+ Expect . pass
1769
+
1767
1770
1768
1771
checkFixesMatch : ProjectInternals -> ReviewError -> Dict String String -> List ( String , ( Error .Target , List Fix ) ) -> Expectation
1769
1772
checkFixesMatch project error_ expectedFixed fixes =
You can’t perform that action at this time.
0 commit comments