Skip to content

docs: fix typos #4763

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

Merged
merged 4 commits into from
May 27, 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
2 changes: 1 addition & 1 deletion docs/src/docs/contributing/website.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/src/docs/contributing/workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/plugins/go-plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions docs/src/docs/welcome/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -76,19 +76,19 @@ 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
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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/welcome/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=")
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/gci/gci.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
6 changes: 3 additions & 3 deletions pkg/golinters/nolintlint/internal/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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`.

2 changes: 1 addition & 1 deletion pkg/printers/githubaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_github_action_config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion scripts/website/expand_templates/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/configuration_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading