diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..c97ba88c4 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = ./vendor,./.git #,bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" +ignore-words-list = clos,creat + diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 000000000..a24f3c6c1 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,20 @@ +name: validate +on: + push: + tags: + - v* + branches: + - main + - v* + pull_request: + +jobs: + codespell: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: install deps + # Version of codespell bundled with Ubuntu is way old, so use pip. + run: pip install codespell + - name: run codespell + run: codespell diff --git a/Makefile b/Makefile index 377f3f488..c914ecc16 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ test-unit: .PHONY: codespell codespell: - codespell -S bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L creat,uint,iff,od,seeked,splitted,marge,ERROR,hist,ether -w + codespell -w clean: ## Clean artifacts $(MAKE) -C docs clean diff --git a/docs/containers.conf.5.md b/docs/containers.conf.5.md index 3ef98dfad..427f9a889 100644 --- a/docs/containers.conf.5.md +++ b/docs/containers.conf.5.md @@ -590,7 +590,7 @@ Number of seconds to wait for container to exit before sending kill signal. **exit_command_delay**=300 -Number of seconds to wait for the API process for the exec call before sending exit command mimicing the Docker behavior of 5 minutes (in seconds). +Number of seconds to wait for the API process for the exec call before sending exit command mimicking the Docker behavior of 5 minutes (in seconds). **tmp_dir**="/run/libpod" diff --git a/libimage/import.go b/libimage/import.go index 8a992b075..3db392784 100644 --- a/libimage/import.go +++ b/libimage/import.go @@ -49,13 +49,13 @@ func (r *Runtime) Import(ctx context.Context, path string, options *ImportOption ic = config.ImageConfig } - hist := []v1.History{ + history := []v1.History{ {Comment: options.CommitMessage}, } config := v1.Image{ Config: ic, - History: hist, + History: history, OS: options.OS, Architecture: options.Arch, Variant: options.Variant, diff --git a/libnetwork/netavark/config.go b/libnetwork/netavark/config.go index d07232350..b7a1d924d 100644 --- a/libnetwork/netavark/config.go +++ b/libnetwork/netavark/config.go @@ -121,7 +121,7 @@ func (n *netavarkNetwork) networkCreate(newNetwork *types.Network, defaultNet bo return nil, errors.Wrapf(types.ErrInvalidArg, "unsupported driver %s", newNetwork.Driver) } - // add gatway when not internal or dns enabled + // add gateway when not internal or dns enabled addGateway := !newNetwork.Internal || newNetwork.DNSEnabled err = internalutil.ValidateSubnets(newNetwork, addGateway, usedNetworks) if err != nil { diff --git a/libnetwork/netavark/network.go b/libnetwork/netavark/network.go index 166d5e31a..15d1f03eb 100644 --- a/libnetwork/netavark/network.go +++ b/libnetwork/netavark/network.go @@ -245,7 +245,7 @@ func parseNetwork(network *types.Network) error { return errors.Errorf("invalid network ID %q", network.ID) } - // add gatway when not internal or dns enabled + // add gateway when not internal or dns enabled addGateway := !network.Internal || network.DNSEnabled return util.ValidateSubnets(network, addGateway, nil) } diff --git a/pkg/report/camelcase/README.md b/pkg/report/camelcase/README.md index 105a6ae33..0d255063d 100644 --- a/pkg/report/camelcase/README.md +++ b/pkg/report/camelcase/README.md @@ -27,9 +27,9 @@ go get github.com/fatih/camelcase ## Usage and examples ```go -splitted := camelcase.Split("GolangPackage") +split := camelcase.Split("GolangPackage") -fmt.Println(splitted[0], splitted[1]) // prints: "Golang", "Package" +fmt.Println(split[0], split[1]) // prints: "Golang", "Package" ``` Both lower camel case and upper camel case are supported. For more info please