diff --git a/docs/src/docs/contributing/architecture.mdx b/docs/src/docs/contributing/architecture.mdx index 7dd5952b9fba..6dfc5b1f8a4e 100644 --- a/docs/src/docs/contributing/architecture.mdx +++ b/docs/src/docs/contributing/architecture.mdx @@ -247,7 +247,7 @@ type Issue struct { We have an abstraction of `result.Processor` to postprocess found issues: -```bash +```sh $ tree -L 1 ./pkg/result/processors/ ./pkg/result/processors/ ├── autogenerated_exclude.go @@ -299,7 +299,7 @@ A processor can hide issues (`nolint`, `exclude`) or change issues (`path_shorte We have an abstraction for printint found issues. -```bash +```sh $ tree -L 1 ./pkg/printers/ ./pkg/printers/ ├── checkstyle.go diff --git a/docs/src/docs/contributing/website.mdx b/docs/src/docs/contributing/website.mdx index 3b53de8f4d73..f3096e1a68f7 100644 --- a/docs/src/docs/contributing/website.mdx +++ b/docs/src/docs/contributing/website.mdx @@ -52,7 +52,7 @@ Netlify deploys the website to production after merging anything to a `master` b Run: -```bash +```sh npm install npm run start ``` @@ -68,7 +68,7 @@ But we can add a new linter and need to change a documentation to list the linte To do it run -```bash +```sh go run ./scripts/expand_website_templates/main.go -only-state ``` diff --git a/docs/src/docs/contributing/workflow.mdx b/docs/src/docs/contributing/workflow.mdx index fff0b2798338..d785f686e47b 100644 --- a/docs/src/docs/contributing/workflow.mdx +++ b/docs/src/docs/contributing/workflow.mdx @@ -20,7 +20,7 @@ Fork and clone [golangci-lint](https://github.com/golangci/golangci-lint) reposi A good way of making sure everything is all right is running the following: -```bash +```sh make build ./golangci-lint run -v ``` @@ -29,7 +29,7 @@ make build When you are satisfied with the changes, we suggest you run: -```bash +```sh $ make test ``` @@ -62,12 +62,12 @@ 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: -```bash +```sh make assets/github-action-config.json ``` 2. The latest version in documentation on our website: -```bash +```sh make expand_website_templates ``` diff --git a/docs/src/docs/product/comparison.mdx b/docs/src/docs/product/comparison.mdx index db053717897f..216435514263 100644 --- a/docs/src/docs/product/comparison.mdx +++ b/docs/src/docs/product/comparison.mdx @@ -48,7 +48,7 @@ We measure peak memory usage (RSS) by tracking of processes RSS every 5 ms. We compare golangci-lint and gometalinter in default mode, but explicitly enable all linters because of small differences in the default configuration. -```bash +```sh $ golangci-lint run --no-config --issues-exit-code=0 --timeout=30m \ --disable-all --enable=deadcode --enable=gocyclo --enable=golint --enable=varcheck \ --enable=structcheck --enable=maligned --enable=errcheck --enable=dupl --enable=ineffassign \ diff --git a/docs/src/docs/usage/configuration.mdx b/docs/src/docs/usage/configuration.mdx index 3b2e8d53f638..af6db1336f27 100644 --- a/docs/src/docs/usage/configuration.mdx +++ b/docs/src/docs/usage/configuration.mdx @@ -8,13 +8,13 @@ Slice options (e.g. list of enabled/disabled linters) are combined from the comm To see a list of enabled by your configuration linters: -```bash +```sh golangci-lint linters ``` ## Command-Line Options -```bash +```sh golangci-lint run -h {.RunHelpText} ``` diff --git a/docs/src/docs/usage/install/index.mdx b/docs/src/docs/usage/install/index.mdx index 90cca8dfa864..c448ae3daffc 100644 --- a/docs/src/docs/usage/install/index.mdx +++ b/docs/src/docs/usage/install/index.mdx @@ -26,7 +26,7 @@ It's highly recommended to install a specific version of golangci-lint available Here is the recommended way to install golangci-lint {.LatestVersion}: -```bash +```sh # binary will be $(go env GOPATH)/bin/golangci-lint curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin {.LatestVersion} @@ -48,14 +48,14 @@ and is constantly being improved. For any problems with `golangci-lint`, check o You can also install a binary release on macOS using [brew](https://brew.sh/): -```bash +```sh brew install golangci/tap/golangci-lint brew upgrade golangci/tap/golangci-lint ``` ### Docker -```bash +```sh docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} golangci-lint run -v ``` @@ -63,7 +63,7 @@ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} g Go source installations are supported for the two most recent Go releases. -```bash +```sh go get github.com/golangci/golangci-lint/cmd/golangci-lint@{.LatestVersion} ``` diff --git a/docs/src/docs/usage/linters.mdx b/docs/src/docs/usage/linters.mdx index 5fc545da1c6f..5908347b9f22 100644 --- a/docs/src/docs/usage/linters.mdx +++ b/docs/src/docs/usage/linters.mdx @@ -4,7 +4,7 @@ title: Linters To see a list of supported linters and which linters are enabled/disabled: -```bash +```sh golangci-lint help linters ``` diff --git a/docs/src/docs/usage/quick-start.mdx b/docs/src/docs/usage/quick-start.mdx index dc069756f079..2894998c0fc8 100644 --- a/docs/src/docs/usage/quick-start.mdx +++ b/docs/src/docs/usage/quick-start.mdx @@ -4,19 +4,19 @@ title: Quick Start To run golangci-lint execute: -```bash +```sh golangci-lint run ``` It's an equivalent of executing: -```bash +```sh golangci-lint run ./... ``` You can choose which directories and files to analyze: -```bash +```sh golangci-lint run dir1 dir2/... dir3/file1.go ``` @@ -24,14 +24,14 @@ Directories are NOT analyzed recursively. To analyze them recursively append `/. GolangCI-Lint can be used with zero configuration. By default the following linters are enabled: -```bash +```sh $ golangci-lint help linters {.LintersCommandOutputEnabledOnly} ``` and the following linters are disabled by default: -```bash +```sh $ golangci-lint help linters ... {.LintersCommandOutputDisabledOnly} @@ -39,6 +39,6 @@ $ golangci-lint help linters Pass `-E/--enable` to enable linter and `-D/--disable` to disable: -```bash +```sh golangci-lint run --disable-all -E errcheck ```