Fix syntax highlighting for bash scripts (#1151)

Fix syntax highlighting for bash scripts by changing language from
bash to sh in triple-backtick blocks: ```bash -> ```sh.

Some of these blocks had command output or prompt as part of the
listening which formatted in odd ways, e.g. colouring every occurrence
of the word "for" or "help" in purple.

With the sh language specification these wrong colours are gone, so use
it.
This commit is contained in:
Julia Ogris 2020-05-18 22:53:20 +10:00 committed by GitHub
parent 7c2871c596
commit ba6476a608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 22 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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