Skip to content

Commit

Permalink
Bump codespell and staticcheck versions.
Browse files Browse the repository at this point in the history
Also fix issues discovered by the new versions.
  • Loading branch information
xiaq committed Aug 16, 2024
1 parent 6703af4 commit 84cb700
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ jobs:
run: |
go install golang.org/x/tools/cmd/stringer@latest
go install golang.org/x/tools/cmd/goimports@latest
# Keep the versions of staticcheck and codespell in sync with CONTRIBUTING.md
go install honnef.co/go/tools/cmd/staticcheck@v0.4.6
pip install --user codespell==2.2.6
# Keep the versions of staticcheck and codespell in sync with docs/workflows.md
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1
pip install --user codespell==2.3.0
- name: Run checks
run: make all-checks

Expand Down
4 changes: 2 additions & 2 deletions docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ The checks depend on some external programs, which can be installed as follows:

```sh
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.4.6
pip install --user codespell==2.2.6
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1
pip install --user codespell==2.3.0
```

## Licensing
Expand Down
2 changes: 1 addition & 1 deletion pkg/eval/go_fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func NewGoFn(name string, impl any) Callable {
b.rawOptions = true
i++
}
if i < implType.NumIn() && reflect.PtrTo(implType.In(i)).Implements(optionsPtrType) {
if i < implType.NumIn() && reflect.PointerTo(implType.In(i)).Implements(optionsPtrType) {
if b.rawOptions {
panic("Function declares both RawOptions and Options parameters")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/getopt/getopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"src.elv.sh/pkg/errutil"
)

// Config configurates the parsing behavior.
// Config configures the parsing behavior.
type Config uint

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (server *Server) register(rcvr any, name string, useName bool) error {
str := ""

// To help the user, see if a pointer receiver would work.
method := suitableMethods(reflect.PtrTo(s.typ), false)
method := suitableMethods(reflect.PointerTo(s.typ), false)
if len(method) != 0 {
str = "rpc.Register: type " + sname + " has no exported methods of suitable type (hint: pass a pointer to value of that type)"
} else {
Expand Down

0 comments on commit 84cb700

Please sign in to comment.