This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
forked from kisielk/errcheck
-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only ignore select functions from the fmt package by default.
…-exclude Check all levels of embedded interfaces against the exclude list.
skip processing generated code
Use golang.org/x/tools/go/packages to load and type check packages. This provides support for projects using go modules to also be able to use errcheck. Tests for vendored packages must be run in a GOPATH.
errcheck can now support packages importing "C", though there are limitations with versions of Go that are earlier than Go 1.11.
If there are type checking errors in the initial packages, do not continue with checking. Stop early to avoid a situation where there are false negatives because the whole program could not be fully checked for unchecked errors.
This reverts commit 8c8888e.
Support go modules
For example, b := bytes.Buffer{} fmt.Fprintf(&b, "%d", 10) should be exempt from errchecks, just like fmt.Printf already is. This change also exempts fmt.Fprint*(os.Stderr, ....) for the same reason.
Add back support for go modules (fixes #155)
Go 1.5 is no longer supported
Not pinning the golang.org/x/tools version causes non-module builds to use the latest version, which is broken on older versions of Go.
I've flagged this as "[ci-skip]" becausee it finds a legitimate regression; hold off on fixing that for another commit.
displays much cleaner
Co-Authored-By: Stephen <[email protected]>
Fix CI, get the tests passing with GO111MODULE=on
Use svg for ci build graphics
Fixes tests on Go 1.14 and newer. Signed-off-by: Eric Chlebek <[email protected]>
The golang.org/x/tools package seems to have dropped support for these old Gos, so we will be supporting only Go 1.11 and higher. Signed-off-by: Eric Chlebek <[email protected]>
Upgrade golang.org/x/tools to latest
Fix #139: Add example of excluding a call to a vendored dependency
Limit the amount of memory errcheck uses with smarter goroutine scheduling
Signed-off-by: Eric Chlebek <[email protected]>
This change gives uses a way to organize and document exclude entries. This is helpful for large codebases where it isn't obvious why a certain pattern isn't excluded.
Ignore comments and empty lines in excludes files
Signed-off-by: Eric Chlebek <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.