Skip to content

Commit 29cbe81

Browse files
committed
Address review issues
Signed-off-by: Kemal Akkoyun <[email protected]>
1 parent 0aaa623 commit 29cbe81

File tree

4 files changed

+371
-164
lines changed

4 files changed

+371
-164
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ go-errorlint -fix ./...
3030
```
3131

3232
The tool can automatically fix:
33+
34+
> [!CAUTION]
35+
> These fixes are still under development and the behavior is not yet stable.
36+
> It is possible that it will make mistakes and cause more harm than good.
37+
> Use with caution.
38+
3339
1. Non-wrapping format verb for fmt.Errorf (changing `%v` to `%w`)
3440
2. Direct error comparisons (replacing `err == ErrFoo` with `errors.Is(err, ErrFoo)`)
3541
3. Type assertions on errors (replacing `err.(*MyError)` with `errors.As` usage)
@@ -82,6 +88,8 @@ Errors returned from standard library functions that explicitly document that
8288
an unwrapped error is returned are allowed by the linter. Notable cases are
8389
`io.EOF` and `sql.ErrNoRows`.
8490

91+
You can pass `-fix` to have go-errorlint automatically fix these issues for you.
92+
8593
**Caveats**:
8694
* Comparing the error returned from `(io.Reader).Read` to `io.EOF` without
8795
`errors.Is` is considered valid as this is
@@ -107,6 +115,8 @@ var me MyError
107115
ok := errors.As(err, &me)
108116
```
109117

118+
You can pass `-fix` to have go-errorlint automatically fix these issues for you.
119+
110120
## Contributing
111121

112122
Do you think you have found a bug? Then please report it via the Github issue tracker. Make sure to

0 commit comments

Comments
 (0)