Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #2296

Merged
merged 6 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,go.sum,package-lock.json,*.min.*,.codespellrc,testdata,./pkg/runner/hashfiles/index.js
check-hidden = true
ignore-regex = .*Te\{0\}st.*
# ignore-words-list =
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion pkg/common/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func FindGitRef(ctx context.Context, file string) (string, error) {
* it means we checked out a branch
*
* If a branches matches first we must continue and check all tags (all references)
* in case we match with a tag later in the interation
* in case we match with a tag later in the iteration
*/
if r.Hash().String() == ref {
if r.Name().IsTag() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/container/docker_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewDockerNetworkRemoveExecutor(name string) common.Executor {
}
defer cli.Close()

// Make shure that all network of the specified name are removed
// Make sure that all network of the specified name are removed
// cli.NetworkRemove refuses to remove a network if there are duplicates
networks, err := cli.NetworkList(ctx, types.NetworkListOptions{})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/runner/run_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func getDockerDaemonSocketMountPath(daemonPath string) string {
return daemonPath
}

// Returns the binds and mounts for the container, resolving paths as appopriate
// Returns the binds and mounts for the container, resolving paths as appropriate
func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string) {
name := rc.jobContainerName()

Expand Down Expand Up @@ -1026,7 +1026,7 @@ func (rc *RunContext) handleServiceCredentials(ctx context.Context, creds map[st
return
}

// GetServiceBindsAndMounts returns the binds and mounts for the service container, resolving paths as appopriate
// GetServiceBindsAndMounts returns the binds and mounts for the service container, resolving paths as appropriate
func (rc *RunContext) GetServiceBindsAndMounts(svcVolumes []string) ([]string, map[string]string) {
if rc.Config.ContainerDaemonSocket == "" {
rc.Config.ContainerDaemonSocket = "/var/run/docker.sock"
Expand Down
Loading