docs: fix typos (#4763)

This commit is contained in:
ccoVeille 2024-05-28 01:47:17 +02:00 committed by GitHub
parent f7387361f7
commit dea416b534
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 24 additions and 24 deletions

View File

@ -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

View File

@ -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
```

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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=")

View File

@ -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.

View File

@ -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{

View File

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

View File

@ -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}

View File

@ -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...)

View File

@ -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 {

View File

@ -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