From dae4aa37ff826ac14b0088fd8207650f1d00e172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 14 Nov 2023 22:19:12 +0200 Subject: [PATCH] docs: spelling and grammar fixes --- cmd/add-doc.txt | 8 ++++---- cmd/add.go | 2 +- docs/configuration.md | 6 +++--- internal/git/exec.go | 2 +- internal/lefthook/run.go | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/add-doc.txt b/cmd/add-doc.txt index fcc73c5f..a4061f98 100644 --- a/cmd/add-doc.txt +++ b/cmd/add-doc.txt @@ -1,11 +1,11 @@ This command will try to build the following structure in repository: ├───.git │ └───hooks -│ └───pre-commit // this executable will be added. Existed file with +│ └───pre-commit // this executable will be added. Existing file with │ // same name will be renamed to pre-commit.old -(lefthook add this dirs if you run command with -d option) +(lefthook adds these dirs if you run the command with the -d option) │ ├───.lefthook // directory for project level hooks -│ └───pre-commit // directory with hooks executables -└───.lefthook-local // directory for personal hooks add it in .gitignore +│ └───pre-commit // directory with hook executables +└───.lefthook-local // directory for personal hooks; add it in .gitignore └───pre-commit diff --git a/cmd/add.go b/cmd/add.go index fa8a662e..b86f1dbe 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -16,7 +16,7 @@ func newAddCmd(opts *lefthook.Options) *cobra.Command { addCmd := cobra.Command{ Use: "add hook-name", - Short: "This command add a hook directory to a repository", + Short: "This command adds a hook directory to a repository", Long: addDoc, Example: "lefthook add pre-commit", Args: cobra.MinimumNArgs(1), diff --git a/docs/configuration.md b/docs/configuration.md index bede2424..c1135a44 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -225,7 +225,7 @@ Use cases: - You have a GUI program that runs git hooks (e.g., VSCode) - You reference executables that are accessible only from a tweaked $PATH environment variable (e.g., when using rbenv or nvm) -- Or even if your GUI programm cannot locate the `lefthook` executable :scream: +- Or even if your GUI program cannot locate the `lefthook` executable :scream: - Or if you want to use ENV variables that control the executables behavior in `lefthook.yml` ```bash @@ -305,7 +305,7 @@ This can be changed in the future. For convenience, please use `remote` configur ### `git_url` -A URL to Git repository. It will be accessed with priveleges of the machine lefthook runs on. +A URL to Git repository. It will be accessed with privileges of the machine lefthook runs on. **Example** @@ -1085,7 +1085,7 @@ Whether to use interactive mode. This applies the certain behavior: **Note** -If you want to pass stdin to your command or script but don't need to get the input from CLI, use [`use_stdin`](#use_stdin) option isntead. +If you want to pass stdin to your command or script but don't need to get the input from CLI, use [`use_stdin`](#use_stdin) option instead. ## Script diff --git a/internal/git/exec.go b/internal/git/exec.go index 5f60d636..78f655cf 100644 --- a/internal/git/exec.go +++ b/internal/git/exec.go @@ -47,7 +47,7 @@ func (o *OsExec) CmdLines(cmd string) ([]string, error) { return strings.Split(out, "\n"), nil } -// CmdArgs runs a command provided with separted words. Trims spaces around output. +// CmdArgs runs a command provided with separated words. Trims spaces around output. func (o *OsExec) CmdArgs(args ...string) (string, error) { out, err := o.rawExecArgs(args...) if err != nil { diff --git a/internal/lefthook/run.go b/internal/lefthook/run.go index b0724182..0fec2287 100644 --- a/internal/lefthook/run.go +++ b/internal/lefthook/run.go @@ -65,8 +65,8 @@ func (l *Lefthook) Run(hookName string, args RunArgs, gitArgs []string) error { return err } - // Suppress prepare-commit-msg output if the hook doesn't exists in config. - // prepare-commit-msg hook is used for seemless synchronization of hooks with config. + // Suppress prepare-commit-msg output if the hook doesn't exist in config. + // prepare-commit-msg hook is used for seamless synchronization of hooks with config. // See: internal/lefthook/install.go _, ok := cfg.Hooks[hookName] if hookName == config.GhostHookName && !ok && !verbose { @@ -136,7 +136,7 @@ Run 'lefthook install' manually.`, } if cfg.Remote.Configured() { - // Apend only source_dir, because source_dir_local doesn't make sense + // Append only source_dir, because source_dir_local doesn't make sense sourceDirs = append( sourceDirs, filepath.Join(