Skip to content

Commit 11c27a7

Browse files
authored
Merge pull request #265 from alexandear/deprecate-err-no-go-files
Deprecate ErrNoGoFiles as it's never returned
2 parents 85b3c63 + 0fe9f58 commit 11c27a7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

errcheck/errcheck.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ func init() {
2323
}
2424

2525
var (
26-
// ErrNoGoFiles is returned when CheckPackage is run on a package with no Go source files
26+
// ErrNoGoFiles is returned when CheckPackage is run on a package with no Go source files.
27+
//
28+
// Deprecated: this error is no longer returned by errcheck.LoadPackages.
2729
ErrNoGoFiles = errors.New("package contains no go source files")
2830
)
2931

main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ func mainCmd(args []string) int {
121121

122122
result, err := checkPaths(&checker, paths...)
123123
if err != nil {
124-
if err == errcheck.ErrNoGoFiles {
125-
fmt.Fprintln(os.Stderr, err)
126-
return exitCodeOk
127-
}
128124
fmt.Fprintf(os.Stderr, "error: failed to check packages: %s\n", err)
129125
return exitFatalError
130126
}

0 commit comments

Comments
 (0)