Pull request: scripts: ignore unchecked errors in generated code
Merge in DNS/adguard-home from fix-errcheck to master Squashed commit of the following: commit 1cc4e12c1d49612046ce6f0a1b56920ffcad2526 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Jan 11 15:28:42 2021 +0300 scripts: ignore unchecked errors in generated code
This commit is contained in:
parent
18be0ad80b
commit
18097edee1
|
@ -19,8 +19,9 @@ The rules are mostly sorted in the alphabetical order.
|
||||||
pkg: fix the network error logging issue
|
pkg: fix the network error logging issue
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `pkg` is the package where most changes took place. If there are
|
Where `pkg` is the directory or Go package (without the `internal/` part)
|
||||||
several such packages, or the change is top-level only, write `all`.
|
where most changes took place. If there are several such packages, or the
|
||||||
|
change is top-level only, write `all`.
|
||||||
|
|
||||||
* Keep your commit messages, including headers, to eighty (**80**) columns.
|
* Keep your commit messages, including headers, to eighty (**80**) columns.
|
||||||
|
|
||||||
|
|
|
@ -116,10 +116,12 @@ nilness ./...
|
||||||
# shadow --strict ./...
|
# shadow --strict ./...
|
||||||
|
|
||||||
# TODO(a.garipov): Enable errcheck fully after handling all errors,
|
# TODO(a.garipov): Enable errcheck fully after handling all errors,
|
||||||
# including the deferred ones, properly. Also, perhaps, enable --blank.
|
# including the deferred and generated ones, properly. Also, perhaps,
|
||||||
|
# enable --blank.
|
||||||
|
#
|
||||||
# errcheck ./...
|
# errcheck ./...
|
||||||
exit_on_output sh -c '
|
exit_on_output sh -c '
|
||||||
errcheck --asserts ./... |\
|
errcheck --asserts --ignoregenerated ./... |\
|
||||||
{ grep -e "defer" -e "_test\.go:" -v || exit 0; }
|
{ grep -e "defer" -e "_test\.go:" -v || exit 0; }
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue