Remove references to withFixes

This commit is contained in:
Jeroen Engels 2020-04-05 09:25:17 +02:00
parent b21b317312
commit 9ce54258a6
4 changed files with 12 additions and 12 deletions

View File

@ -6,8 +6,9 @@ module Review.Fix exposing
{-| Tools to write automatic error fixes.
When creating a [`Review.Rule.Error`](./Review-Rule#Error), you can provide an automatic
fix for the error using [`Review.Rule.withFixes`](./Review-Rule#withFixes) so that the
user doesn't need to fix the problem themselves.
fix for the error using [`Review.Rule.errorWithFix`](./Review-Rule#errorWithFix)
or other functions that end with "withFix" so that the user doesn't need to fix
the problem themselves.
In the [CLI], the user can ask to fix the errors automatically, and in doing so,
they will be presented by a fix which they can accept or refuse. If the fix gets

View File

@ -842,13 +842,12 @@ atExactly range ((ExpectedError expectedError_) as expectedError) =
ExpectedError { expectedError_ | under = UnderExactly (getUnder expectedError) range }
{-| Create an expectation that the error provides fixes, meaning that it used
the [`withFixes`](#withFixes) function) and an expectation of what the source
code should be after the error's fixes have been applied.
{-| Create an expectation that the error provides an automatic fix, meaning that it used
functions like [`errorWithFix`](./Review-Rule#errorWithFix), and an expectation of what the source
code should be after the error's fix have been applied.
In the absence of `whenFixed`, the test will fail if the error provides fixes.
In other words: If the error provides fixes, you need to use `withFixes`, and if
it doesn't, you should not use `withFixes`.
In the absence of `whenFixed`, the test will fail if the error provides a fix.
In other words, you only need to use this function if the error provides a fix.
tests : Test
tests =

View File

@ -356,8 +356,8 @@ I expected that the error with the following message
would provide some fixes, but I didn't find any.
Hint: Maybe you forgot to call `Rule.withFixes` on the error that you
created, or maybe the list of provided fixes was empty."""
Hint: Maybe you forgot to call a function like `Rule.errorWithFix` or maybe
the list of provided fixes was empty."""
unexpectedFixes : ReviewError -> String

View File

@ -768,8 +768,8 @@ I expected that the error with the following message
would provide some fixes, but I didn't find any.
Hint: Maybe you forgot to call `Rule.withFixes` on the error that you
created, or maybe the list of provided fixes was empty."""
Hint: Maybe you forgot to call a function like `Rule.errorWithFix` or maybe
the list of provided fixes was empty."""
unexpectedFixesTest : Test