From 2cd6f0fc797e622d47c23ab393d6a9b4cfadccb4 Mon Sep 17 00:00:00 2001 From: mimikun Date: Mon, 20 Nov 2023 20:46:09 +0900 Subject: [PATCH] Fix typo (#434) * Fix typo * Fix tests --------- Co-authored-by: Sebastian Tiedtke --- CONTRIBUTING.md | 2 +- expect/expect.go | 2 +- internal/api/runme/runner/v1/runner.proto | 2 +- internal/auth/auth.go | 2 +- internal/auth/disk_storage_test.go | 2 +- internal/cmd/auth.go | 2 +- internal/document/editor/cell.go | 2 +- internal/document/editor/cell_test.go | 2 +- internal/gen/proto/go/runme/runner/v1/runner.pb.go | 2 +- internal/gen/proto/ts/runme/runner/v1/runner_pb.d.ts | 2 +- internal/gen/proto/ts/runme/runner/v1/runner_pb.ts | 2 +- internal/renderer/testdata/equalvshash.md | 2 +- internal/runner/command.go | 2 +- internal/runner/command_windows.go | 2 +- internal/runner/service_test.go | 2 +- pkg/project/formatter.go | 2 +- pkg/project/project_test.go | 4 ++-- pkg/project/test_project/.env | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc8ae4ce0..8762878a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ It is always best to discuss your plans beforehand, to ensure that your contribu - Make commits of logical units - Write [good commit messages](https://cbea.ms/git-commit/) - Push your changes to a topic branch in your fork of the repository -- As you push your changes, update the pull request with new infomation and tasks as you complete them +- As you push your changes, update the pull request with new information and tasks as you complete them - Project maintainers might comment on your work as you progress - When you are done, remove the PR's draft status and ping the maintainers for a review diff --git a/expect/expect.go b/expect/expect.go index 2442d9b34..680ae9079 100644 --- a/expect/expect.go +++ b/expect/expect.go @@ -853,7 +853,7 @@ func (e *GExpect) ExpectSwitchCase(cs []Caser, timeout time.Duration) (string, [ if err != nil { return tbuf.String(), nil, -1, fmt.Errorf("io.Copy failed: %v", err) } - // timer shoud be reset when new output is available. + // timer should be reset when new output is available. if nr > 0 { timer = time.NewTimer(timeout) } diff --git a/internal/api/runme/runner/v1/runner.proto b/internal/api/runme/runner/v1/runner.proto index 7a13b03a3..8c08cb9ab 100644 --- a/internal/api/runme/runner/v1/runner.proto +++ b/internal/api/runme/runner/v1/runner.proto @@ -139,7 +139,7 @@ message ExecuteRequest { // has no effect in non-interactive mode optional Winsize winsize = 10; - // background indiciates a background process + // background indicates a background process // this will send the process' PID as a first response bool background = 11; diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 6b47982df..2fb753d57 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -62,7 +62,7 @@ type Auth struct { // while other can rely on manual copy&paste. env Env - // loginInProgress is a mutex to prevent concurrect `Login` calls. + // loginInProgress is a mutex to prevent concurrent `Login` calls. loginInProgress uint32 // loginSession contains details about the current login session. diff --git a/internal/auth/disk_storage_test.go b/internal/auth/disk_storage_test.go index 1df09cc13..c296acb4f 100644 --- a/internal/auth/disk_storage_test.go +++ b/internal/auth/disk_storage_test.go @@ -24,7 +24,7 @@ func TestDiskStorage(t *testing.T) { require.Equal(t, expectedToken, token) // Read from non existing key. - err = ds.Load("invaid-key", &token) + err = ds.Load("invalid-key", &token) require.ErrorIs(t, err, ErrNotFound) // Read from invalid path. diff --git a/internal/cmd/auth.go b/internal/cmd/auth.go index ec8ca3753..293449cf3 100644 --- a/internal/cmd/auth.go +++ b/internal/cmd/auth.go @@ -14,7 +14,7 @@ func loginCmd() *cobra.Command { cmd := &cobra.Command{ Use: "login", Short: "Log in to Runme (optional)", - Long: "Log in to Runme is not required for standalone funtionality", + Long: "Log in to Runme is not required for standalone functionality", RunE: func(cmd *cobra.Command, args []string) error { return newAuth().Login(cmd.Context()) }, diff --git a/internal/document/editor/cell.go b/internal/document/editor/cell.go index d0f2cd9a8..d8906148a 100644 --- a/internal/document/editor/cell.go +++ b/internal/document/editor/cell.go @@ -55,7 +55,7 @@ type Notebook struct { } // This mimics what otherwise would happen in the extension -func (n *Notebook) ForceLifecyleIdentities() { +func (n *Notebook) ForceLifecycleIdentities() { for _, c := range n.Cells { id, ok := c.Metadata[PrefixAttributeName(InternalAttributePrefix, "id")] if !ok && id == "" || !ulid.ValidID(id) { diff --git a/internal/document/editor/cell_test.go b/internal/document/editor/cell_test.go index 568677361..a811291bd 100644 --- a/internal/document/editor/cell_test.go +++ b/internal/document/editor/cell_test.go @@ -350,7 +350,7 @@ func Test_serializeCells(t *testing.T) { require.NoError(t, err) cells := toCells(node, data) - // Add private fields whcih will be filtered out durign serialization. + // Add private fields which will be filtered out durign serialization. cells[0].Metadata["_private"] = "private" cells[0].Metadata["runme.dev/internal"] = "internal" diff --git a/internal/gen/proto/go/runme/runner/v1/runner.pb.go b/internal/gen/proto/go/runme/runner/v1/runner.pb.go index 7a6899454..0ca91b501 100644 --- a/internal/gen/proto/go/runme/runner/v1/runner.pb.go +++ b/internal/gen/proto/go/runme/runner/v1/runner.pb.go @@ -785,7 +785,7 @@ type ExecuteRequest struct { // sets pty winsize // has no effect in non-interactive mode Winsize *Winsize `protobuf:"bytes,10,opt,name=winsize,proto3,oneof" json:"winsize,omitempty"` - // background indiciates a background process + // background indicates a background process // this will send the process' PID as a first response Background bool `protobuf:"varint,11,opt,name=background,proto3" json:"background,omitempty"` // session_id indicates in which Session the program should execute. diff --git a/internal/gen/proto/ts/runme/runner/v1/runner_pb.d.ts b/internal/gen/proto/ts/runme/runner/v1/runner_pb.d.ts index b28a61272..a21f46b75 100644 --- a/internal/gen/proto/ts/runme/runner/v1/runner_pb.d.ts +++ b/internal/gen/proto/ts/runme/runner/v1/runner_pb.d.ts @@ -235,7 +235,7 @@ export interface ExecuteRequest { */ winsize?: Winsize; /** - * background indiciates a background process + * background indicates a background process * this will send the process' PID as a first response * * @generated from protobuf field: bool background = 11; diff --git a/internal/gen/proto/ts/runme/runner/v1/runner_pb.ts b/internal/gen/proto/ts/runme/runner/v1/runner_pb.ts index b5d27d048..2520f070c 100644 --- a/internal/gen/proto/ts/runme/runner/v1/runner_pb.ts +++ b/internal/gen/proto/ts/runme/runner/v1/runner_pb.ts @@ -642,7 +642,7 @@ export class ExecuteRequest extends Message { winsize?: Winsize; /** - * background indiciates a background process + * background indicates a background process * this will send the process' PID as a first response * * @generated from field: bool background = 11; diff --git a/internal/renderer/testdata/equalvshash.md b/internal/renderer/testdata/equalvshash.md index 2a9e871b5..98f3edc2d 100644 --- a/internal/renderer/testdata/equalvshash.md +++ b/internal/renderer/testdata/equalvshash.md @@ -18,7 +18,7 @@ The current version looks as follows: ## Best Practices -We have accumulated a set of best practices while developing VSCode extensions. Please note that these are just recommendations, sometimes based on personal preference. There are many ways to write an extension, and we found the following allow you to write them in a scaleable and testable way: +We have accumulated a set of best practices while developing VSCode extensions. Please note that these are just recommendations, sometimes based on personal preference. There are many ways to write an extension, and we found the following allow you to write them in a scalable and testable way: - [Initiate Extensions through an `ExtensionController`](./docs/ExtensionController.md) - [Building WebViews](./docs/WebViews.md) diff --git a/internal/runner/command.go b/internal/runner/command.go index 83d4177cb..8b24a8749 100644 --- a/internal/runner/command.go +++ b/internal/runner/command.go @@ -498,7 +498,7 @@ func (c *command) ProcessWait() error { return errors.WithStack(c.cmd.Wait()) } -// Finalize performs necassary actions and cleanups after the process exits. +// Finalize performs necessary actions and cleanups after the process exits. func (c *command) Finalize() (err error) { if c.cmd.ProcessState == nil { return errors.New("process not finished") diff --git a/internal/runner/command_windows.go b/internal/runner/command_windows.go index 18ccae1e0..2e575bd6f 100644 --- a/internal/runner/command_windows.go +++ b/internal/runner/command_windows.go @@ -14,7 +14,7 @@ func setSysProcAttrCtty(cmd *exec.Cmd) {} func setSysProcAttrPgid(cmd *exec.Cmd) {} func disableEcho(fd uintptr) error { - return errors.New("Error: Environtment not supported! " + + return errors.New("Error: Environment not supported! " + "Runme currently doesn't support PowerShell. " + "Please go to https://github.com/stateful/runme/issues/173 to follow progress on this " + "and join our Discord server at https://discord.gg/runme if you have further questions!") diff --git a/internal/runner/service_test.go b/internal/runner/service_test.go index fdce4fd3e..5ffbd22b3 100644 --- a/internal/runner/service_test.go +++ b/internal/runner/service_test.go @@ -467,7 +467,7 @@ func Test_runnerService(t *testing.T) { }) // ExecuteClientCancel is similar to "ExecuteCloseSendDirection" but the client cancels - // the connection. When running wihout TTY, this and sending ExecuteRequest.stop are + // the connection. When running without TTY, this and sending ExecuteRequest.stop are // the only ways to interrupt a program. t.Run("ExecuteClientCancel", func(t *testing.T) { t.Parallel() diff --git a/pkg/project/formatter.go b/pkg/project/formatter.go index 981cc41a2..2ba3b6602 100644 --- a/pkg/project/formatter.go +++ b/pkg/project/formatter.go @@ -45,7 +45,7 @@ func Format(files []string, basePath string, flatten bool, formatJSON bool, writ formatted = buf.Bytes() } else { if identityResolver.CellEnabled() { - notebook.ForceLifecyleIdentities() + notebook.ForceLifecycleIdentities() } formatted, err = editor.Serialize(notebook) diff --git a/pkg/project/project_test.go b/pkg/project/project_test.go index b4dfd367f..8009e3778 100644 --- a/pkg/project/project_test.go +++ b/pkg/project/project_test.go @@ -98,7 +98,7 @@ func Test_directoryGitProject(t *testing.T) { require.NoError(t, err) assert.Equal(t, map[string]string{ - "SECRET_1": "secret1_overriden", + "SECRET_1": "secret1_overridden", "SECRET_2": "secret2", "SECRET_3": "secret3", }, envs) @@ -188,7 +188,7 @@ func Test_directoryBareProject(t *testing.T) { require.NoError(t, err) assert.Equal(t, map[string]string{ - "SECRET_1": "secret1_overriden", + "SECRET_1": "secret1_overridden", "SECRET_2": "secret2", "SECRET_3": "secret3", }, envs) diff --git a/pkg/project/test_project/.env b/pkg/project/test_project/.env index e32029091..6a0a72247 100644 --- a/pkg/project/test_project/.env +++ b/pkg/project/test_project/.env @@ -1,2 +1,2 @@ -SECRET_1=secret1_overriden +SECRET_1=secret1_overridden SECRET_2=secret2