-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
$ go vet ./... # cuelang.org/go/cue/errors cue/errors/errors.go:326:15: method Is(err error, target error) bool should have signature Is(error) bool cue/errors/errors.go:335:15: method As(err error, target interface{}) bool should have signature As(any) bool # cuelang.org/go/cue/ast/astutil cue/ast/astutil/resolve.go:207:6: unreachable code The unreachable code warning is an easy one: just like in other bits of disabled code, comment it out. The Is/As signature warning is slightly more worrying. Presumably due to a mistake, cue/errors.list never actually satisfied the interfaces used by Go's errors.As and errors.Is. The added parameter was never used, reinforcing that theory. Adjust the two methods. We don't strictly need a regression test, given that `go vet` will now spot that mistake in CI. And, as per the above, add `go vet` to CI. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ie6f65a89fb41f232beede0ab732b14f0a0b831a1 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/537656 Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]>
- Loading branch information
Showing
6 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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