diff --git a/docs/src/docs/contributing/website.mdx b/docs/src/docs/contributing/website.mdx index aaf68a2e0e50..428ea9620e29 100644 --- a/docs/src/docs/contributing/website.mdx +++ b/docs/src/docs/contributing/website.mdx @@ -24,7 +24,7 @@ Left menu is configured in `src/config/sidebar.yml`. ## Articles -Articles are located in `src/docs/` in `*.mdx` files. [MDX](https://mdxjs.com/getting-started/gatsby) is markdown +Articles are located in `src/docs/` in `*.mdx` files. [MDX](https://mdxjs.com/getting-started/gatsby) is Markdown allowing to use `React` components. ## Templating diff --git a/docs/src/docs/contributing/workflow.mdx b/docs/src/docs/contributing/workflow.mdx index 79df46701e69..e1fd90f08b11 100644 --- a/docs/src/docs/contributing/workflow.mdx +++ b/docs/src/docs/contributing/workflow.mdx @@ -45,20 +45,20 @@ Push your branch to your `golangci-lint` fork and open a pull request against th ## Pull request checks -First, please, accept [CLA](https://gist.github.com/jirfag/26a39fd375da84b2d5ad4296fecb0668) - [cla assistant](https://cla-assistant.io/) will make a comment on the pull request about it. +First, please, accept [CLA](https://gist.github.com/jirfag/26a39fd375da84b2d5ad4296fecb0668) - [CLA assistant](https://cla-assistant.io/) will make a comment on the pull request about it. -Also, we run a few checks in CI by using GitHub actions, you can see them [here](https://github.com/golangci/golangci-lint/blob/master/.github/workflows/pr.yml). +Also, we run a few checks in CI by using GitHub Actions, you can see them [here](https://github.com/golangci/golangci-lint/blob/master/.github/workflows/pr.yml). ## New releases First, see [our versioning policy](/product/roadmap/#versioning-policy). To make a new release create a tag `vx.y.z`. Don't forget to add zero patch version for a new minor release, e.g. `v1.99.0`. -A GitHub action [workflow](https://github.com/golangci/golangci-lint/blob/master/.github/workflows/tag.yml) will start building and publishing release after that. +A GitHub Action [workflow](https://github.com/golangci/golangci-lint/blob/master/.github/workflows/tag.yml) will start building and publishing release after that. After making a release you need to update: -1. GitHub [action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) by running: +1. GitHub [Action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) by running: ```sh make assets/github-action-config.json ``` diff --git a/docs/src/docs/plugins/go-plugins.mdx b/docs/src/docs/plugins/go-plugins.mdx index ea54811a6b99..e0d86df75076 100644 --- a/docs/src/docs/plugins/go-plugins.mdx +++ b/docs/src/docs/plugins/go-plugins.mdx @@ -48,7 +48,7 @@ An example linter can be found at [here](https://github.com/golangci/example-plu If you're looking for instructions on how to configure your own custom linter, they can be found further down. 1. If the project you want to lint does not have one already, copy the [.golangci.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.yml) to the root directory. -2. Adjust the yaml to appropriate `linters-settings.custom` entries as so: +2. Adjust the YAML to appropriate `linters-settings.custom` entries as so: ```yaml title=.golangci.yml linters-settings: custom: diff --git a/docs/src/docs/welcome/install.mdx b/docs/src/docs/welcome/install.mdx index f1a82655f004..f95fb911b9bf 100644 --- a/docs/src/docs/welcome/install.mdx +++ b/docs/src/docs/welcome/install.mdx @@ -36,7 +36,7 @@ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/insta # or install it into ./bin/ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s {.LatestVersion} -# In alpine linux (as it does not come with curl by default) +# In Alpine Linux (as it does not come with curl by default) wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s {.LatestVersion} golangci-lint --version @@ -62,7 +62,7 @@ On Windows, you can run the above commands with Git Bash, which comes with [Git Golangci-lint is available inside the majority of the package managers. -### MacOS +### macOS #### Brew @@ -76,8 +76,8 @@ brew install golangci-lint brew upgrade golangci-lint ``` -Note: Previously we used a [homebrew tap](https://github.com/golangci/homebrew-tap). We recommend using official formula instead of the tap, but sometimes the most recent release -isn't immediately available via homebrew core due to manual updates that need to occur from homebrew core maintainers. In this case, the tap formula, which is updated automatically, +Note: Previously we used a [Homebrew tap](https://github.com/golangci/homebrew-tap). We recommend using official formula instead of the tap, but sometimes the most recent release +isn't immediately available via Homebrew core due to manual updates that need to occur from Homebrew core maintainers. In this case, the tap formula, which is updated automatically, can be used to install the latest version of `golangci-lint`: ```sh @@ -85,10 +85,10 @@ brew tap golangci/tap brew install golangci/tap/golangci-lint ``` -#### Macports +#### MacPorts -It can also be installed through [macports](https://www.macports.org/) -The macports installation mode is community driven, and not officially maintained by golangci team. +It can also be installed through [MacPorts](https://www.macports.org/) +The MacPorts installation mode is community driven, and not officially maintained by golangci team. ```sh sudo port install golangci-lint diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index 018dd83f7ae4..96b9d0bde25d 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -50,7 +50,7 @@ The following plugins support `golangci-lint`: ## Shell Completion -`golangci-lint` can generate bash, fish, powershell, and zsh completion files. +`golangci-lint` can generate Bash, fish, PowerShell, and Zsh completion files. ### macOS diff --git a/pkg/commands/run.go b/pkg/commands/run.go index b6ff6d535b3a..0f11a4793b71 100644 --- a/pkg/commands/run.go +++ b/pkg/commands/run.go @@ -674,7 +674,7 @@ func computeBinarySalt(version string) ([]byte, error) { func computeConfigSalt(cfg *config.Config) ([]byte, error) { lintersSettingsBytes, err := yaml.Marshal(cfg.LintersSettings) if err != nil { - return nil, fmt.Errorf("failed to json marshal config linter settings: %w", err) + return nil, fmt.Errorf("failed to JSON marshal config linter settings: %w", err) } configData := bytes.NewBufferString("linters-settings=") diff --git a/pkg/config/config.go b/pkg/config/config.go index 59f6eef0da91..1dd064013a22 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -9,7 +9,7 @@ import ( "github.com/ldez/gomoddirectives" ) -// Config encapsulates the config data specified in the golangci-lint yaml config file. +// Config encapsulates the config data specified in the golangci-lint YAML config file. type Config struct { cfgDir string // The directory containing the golangci-lint config file. diff --git a/pkg/golinters/gci/gci.go b/pkg/golinters/gci/gci.go index 08733ca2f103..38ed2a033067 100644 --- a/pkg/golinters/gci/gci.go +++ b/pkg/golinters/gci/gci.go @@ -194,7 +194,7 @@ func diffFormattedFilesToArray(paths []string, cfg gcicfg.Config, diffs *[]strin }) } -// Code bellow this comment is borrowed and modified from gci. +// Code below this comment is borrowed and modified from gci. // https://github.com/daixiang0/gci/blob/4725b0c101801e7449530eee2ddb0c72592e3405/pkg/config/config.go var defaultOrder = map[string]int{ diff --git a/pkg/golinters/nolintlint/internal/README.md b/pkg/golinters/nolintlint/internal/README.md index 1643df7a57a8..e4d48f012bf8 100644 --- a/pkg/golinters/nolintlint/internal/README.md +++ b/pkg/golinters/nolintlint/internal/README.md @@ -1,7 +1,7 @@ # nolintlint nolintlint is a Go static analysis tool to find ill-formed or insufficiently explained `//nolint` directives for golangci-lint -(or any other linter, using this package) +(or any other linter, using this package) ## Purpose @@ -15,7 +15,7 @@ func hash(data []byte) []byte { } ``` -In the above case, nolint directives are present but the user has no idea why this is being done or which linter +In the above case, nolint directives are present, but the user has no idea why this is being done or which linter is being suppressed (in this case, gosec recommends against use of md5). `nolintlint` can require that the code provide an explanation, which might look as follows: ```Go @@ -26,6 +26,6 @@ func hash(data []byte) []byte { } ``` -`nolintlint` can also identify cases where you may have written `// nolint`. Finally `nolintlint`, can also enforce that you +`nolintlint` can also identify cases where you may have written `// nolint`. Finally, `nolintlint`, can also enforce that you use the machine-readable nolint directive format `//nolint:all` and that you mention what linter is being suppressed, as shown above when we write `//nolint:gosec`. diff --git a/pkg/printers/githubaction.go b/pkg/printers/githubaction.go index a37c4aeb67a4..d9cdb1e6e603 100644 --- a/pkg/printers/githubaction.go +++ b/pkg/printers/githubaction.go @@ -14,7 +14,7 @@ type GitHubAction struct { w io.Writer } -// NewGitHubAction output format outputs issues according to GitHub actions. +// NewGitHubAction output format outputs issues according to GitHub Action. // Deprecated func NewGitHubAction(w io.Writer) *GitHubAction { return &GitHubAction{w: w} diff --git a/scripts/gen_github_action_config/main.go b/scripts/gen_github_action_config/main.go index d6b6ba769a2d..809e8943de05 100644 --- a/scripts/gen_github_action_config/main.go +++ b/scripts/gen_github_action_config/main.go @@ -225,7 +225,7 @@ func fetchAllReleases(ctx context.Context) ([]release, error) { for { err := client.Query(ctx, &q, vars) if err != nil { - return nil, fmt.Errorf("failed to fetch releases page from github: %w", err) + return nil, fmt.Errorf("failed to fetch releases page from GitHub: %w", err) } releases := q.Repository.Releases allReleases = append(allReleases, releases.Nodes...) diff --git a/scripts/website/expand_templates/main.go b/scripts/website/expand_templates/main.go index 24128a3fe1f4..24e9e847c4bf 100644 --- a/scripts/website/expand_templates/main.go +++ b/scripts/website/expand_templates/main.go @@ -66,7 +66,7 @@ func processDoc(path string, replacements map[string]string, madeReplacements ma nextContent := content nextContent = strings.ReplaceAll(nextContent, fmt.Sprintf("{.%s}", key), replacement) - // Yaml formatter in mdx code section makes extra spaces, need to match them too. + // YAML formatter in mdx code section makes extra spaces, need to match them too. nextContent = strings.ReplaceAll(nextContent, fmt.Sprintf("{ .%s }", key), replacement) if nextContent != content { diff --git a/test/configuration_file_test.go b/test/configuration_file_test.go index 8b736b0ad520..83cd46a6dcce 100644 --- a/test/configuration_file_test.go +++ b/test/configuration_file_test.go @@ -113,7 +113,7 @@ func decodeYamlFile(filename string) (any, error) { var m any err = yaml.NewDecoder(yamlFile).Decode(&m) if err != nil { - return nil, fmt.Errorf("[%s] yaml decode: %w", filename, err) + return nil, fmt.Errorf("[%s] YAML decode: %w", filename, err) } return m, nil