From 582afcd11e7cee1c57e4ca20a3f3d583d841f49e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 17 Nov 2023 10:45:02 +0545 Subject: [PATCH] docs: correct grammar and typos --- README.md | 2 +- config/commits.go | 2 +- config/config.go | 2 +- docs/content/configuration/config-file.md | 12 ++++++------ docs/content/contributing/filtering.mdx | 2 +- docs/content/contributing/get_started.md | 8 ++++---- docs/content/usage/docker.md | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 874f9a4d..63558c77 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,4 @@ Contributions are most welcome. Please check the [CONTRIBUTING](https://commitsa ## Sponsoring -If you feel like showing even more support for this project you can sponsor it using the Sponsor button on Github. A little help goes a long way when it comes with OSS and it'll help support this project. +If you feel like showing even more support for this project you can sponsor it using the Sponsor button on GitHub. A little help goes a long way when it comes with OSS and it'll help support this project. diff --git a/config/commits.go b/config/commits.go index 89e5ee58..85f5a8c3 100644 --- a/config/commits.go +++ b/config/commits.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/viper" ) -// CommitConfig will return the RunnerOptions using defaults unless overriden in config or flags +// CommitConfig will return the RunnerOptions using defaults unless overridden in config or flags func CommitConfig() root_runner.RunnerOptions { // defaults strict := true diff --git a/config/config.go b/config/config.go index 60cbd3fe..d7c56ac7 100644 --- a/config/config.go +++ b/config/config.go @@ -11,7 +11,7 @@ const ( CommitsarConfigPath = "COMMITSAR_CONFIG_PATH" ) -// LoadConfig iterrates through possible config paths. No config will be loaded if no files are present. +// LoadConfig iterates through possible config paths. No config will be loaded if no files are present. func LoadConfig() error { viper.AutomaticEnv() viper.SetConfigName(".commitsar") diff --git a/docs/content/configuration/config-file.md b/docs/content/configuration/config-file.md index 2d30f623..94b01555 100644 --- a/docs/content/configuration/config-file.md +++ b/docs/content/configuration/config-file.md @@ -7,9 +7,9 @@ title: Configuration File **Name:** `.commitsar.yml` -In order to make configuration easier than through flags we provide configuration file support. Most up to date examples can be found in . +In order to make configuration easier than through flags we provide configuration file support. Most up-to-date examples can be found in . -By default the current working directory is used to scan for the file. However this can be overriden by specifying `COMMITSAR_CONFIG_PATH` environment variable. Accepts relative or absolute paths. +By default the current working directory is used to scan for the file. However this can be overridden by specifying `COMMITSAR_CONFIG_PATH` environment variable. Accepts relative or absolute paths. Example: `COMMITSAR_CONFIG_PATH=./testdata` will scan for `.commitsar.yaml` in the `testdata` folder. @@ -40,17 +40,17 @@ commits: | Name | Default Value | Description | Available from | | -------------- | ------------- | ------------------------------------------------------------------------------------------------------- | -------------- | -| disabled | false | Disables checking commmits. Useful if you want to use commitsar only for PR titles. | v0.14.0 | +| disabled | false | Disables checking commits. Useful if you want to use commitsar only for PR titles. | v0.14.0 | | strict | true | Enforces strict category enforcement. | v0.14.0 | -| limit | none | Makes commitsar check only the last x commits. Useful if you want to run commitsar on master. | v0.14.0 | -| all | false | Makes commitsar check all the commits in history. **Overrides the `limit` flag** | v0.14.0 | +| limit | none | Makes commitsar check only the last x commits. Useful if you want to run commitsar on master. | v0.14.0 | +| all | false | Makes commitsar check all the commits in history. **Overrides the `limit` flag** | v0.14.0 | | upstreamBranch | origin/master | Makes commitsar check against specific branch (e.g. use `origin/main` if `main` is your default branch) | v0.17.0 | ## Pull Request style settings **Pull Request pipeline is still in early stages. Please report any bugs** -#### Convetional style +#### Conventional style ```yaml pull_request: diff --git a/docs/content/contributing/filtering.mdx b/docs/content/contributing/filtering.mdx index c0e58f1b..34983550 100644 --- a/docs/content/contributing/filtering.mdx +++ b/docs/content/contributing/filtering.mdx @@ -20,7 +20,7 @@ import Mermaid from "@theme/Mermaid"; ### Branch diff By default commitsar will run git log on the base branch and the branch which is going to get merged and gets a diff of the commit objects. -This allows us to get commits only on the branch iregardless of what was merged from master. +This allows us to get commits only on the branch regardless of what was merged from master. ### Filtering by type diff --git a/docs/content/contributing/get_started.md b/docs/content/contributing/get_started.md index b0fb6f55..855572ec 100644 --- a/docs/content/contributing/get_started.md +++ b/docs/content/contributing/get_started.md @@ -6,17 +6,17 @@ title: Get started ## Requirements - [Go](https://golang.org/) (See pinned version in go.mod) -- [git](https://git-scm.com/) (while git is not required to run commitsar it is needed to set up tests) +- [git](https://git-scm.com/) (while git is not required to run commitsar, it is needed to set up tests) This project also uses [magefiles](https://magefile.org/). To get up and running please run: `go install github.com/magefile/mage`. These allow us to set up templates and cross-platform commands. ## Running tests -Run `mage test`. This will git clone all git bundles and run tests in the entire repo. To run single tests use the VSCode functionality or provide full path to `go test`. +Run `mage test`. This will git clone all git bundles and run tests in the entire repo. To run single tests use the VSCode functionality or provide the full path to `go test`. ## Git bundles -In order to test commitsar against complicated real-life examples we use [git bundles](https://git-scm.com/docs/git-bundle). These can be `git cloned` like real repositories. They allow us to created real history and prevent edge cases that can happen when creating git history using shell (all commits have same timestamp for example). +In order to test commitsar against complicated real-life examples we use [git bundles](https://git-scm.com/docs/git-bundle). These can be `git cloned` like real repositories. They allow us to create real history and prevent edge cases that can happen when creating git history using shell (all commits have the same timestamp, for example). ### Creating a new bundle @@ -27,7 +27,7 @@ In order to test commitsar against complicated real-life examples we use [git bu - once ready run `git bundle create name_of_repo.bundle --all` - copy the bundle to testdata/ -All files outside of .bundle files are ignore in the testdata folder so you don't have to worry about cleanup. +All files outside of .bundle files are ignored in the testdata folder so you don't have to worry about cleanup. ## Commit style diff --git a/docs/content/usage/docker.md b/docs/content/usage/docker.md index 8424a19c..77ac59fe 100644 --- a/docs/content/usage/docker.md +++ b/docs/content/usage/docker.md @@ -13,4 +13,4 @@ docker run --rm --name="commitsar" -w /src -v "$(pwd)":/src aevea/commitsar docker run --rm --name="commitsar" -w /src -v "$(pwd)":/src aevea/commitsar ./path-to-repo ``` -Make sure to load the working directory where `.git` folder is present. Commitsar will not work without the `.git` folder. This can be overriden by setting the path argument. +Make sure to load the working directory where `.git` folder is present. Commitsar will not work without the `.git` folder. This can be overridden by setting the path argument.