Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrandl committed Aug 23, 2024
1 parent 604488a commit 4215989
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
if: ${{ matrix.command == 'lint' }}

- name: Install linter
run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.6
run: go install honnef.co/go/tools/cmd/staticcheck@v0.5.0
if: ${{ matrix.command == 'lint' }}

- name: Build the weaver binary
Expand Down
2 changes: 1 addition & 1 deletion cmd/weaver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func run(deployer string, args []string) (int, error) {
binary := "weaver-" + deployer
if _, err := exec.LookPath(binary); err != nil {
msg := fmt.Sprintf(`"weaver %s" is not a weaver command. See "weaver --help". If you're trying to invoke a custom deployer, the %q binary was not found. You may need to install the %q binary or add it to your PATH.`, deployer, binary, binary)
return 1, fmt.Errorf(wrap(msg, 80))
return 1, fmt.Errorf("%s", wrap(msg, 80))
}
cmd := exec.Command(binary, args...)
cmd.Stdin = os.Stdin
Expand Down
2 changes: 1 addition & 1 deletion dev/build_and_test
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function cmd_vet() {

function cmd_lint() {
if ! exists staticcheck; then
printf "staticcheck not found; install via\ngo install honnef.co/go/tools/cmd/staticcheck@v0.4.6\n" >&2
printf "staticcheck not found; install via\ngo install honnef.co/go/tools/cmd/staticcheck@v0.5.0\n" >&2
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion internal/net/call/stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestErrorArgsNotEncoded(t *testing.T) {
})

if !strings.Contains(err.Error(), "decoder: unable to read") {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
}

Expand Down
6 changes: 3 additions & 3 deletions runtime/codegen/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func TestErrorDecUnableToRead(t *testing.T) {
dec.Bool()
})
if !strings.Contains(err.Error(), "unable to read #bytes") {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
}

Expand All @@ -160,7 +160,7 @@ func TestErrorUnableToDecBool(t *testing.T) {
dec.Bool()
})
if !strings.Contains(err.Error(), "unable to decode bool") {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
}

Expand All @@ -176,7 +176,7 @@ func TestErrorUnableToDecBytes(t *testing.T) {
dec.Bytes()
})
if !strings.Contains(err.Error(), "unable to decode bytes; expected length") {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}
}

Expand Down

0 comments on commit 4215989

Please sign in to comment.