Skip to content

Commit ba6476a

Browse files
authored
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.
1 parent 7c2871c commit ba6476a

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

docs/src/docs/contributing/architecture.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ type Issue struct {
247247

248248
We have an abstraction of `result.Processor` to postprocess found issues:
249249

250-
```bash
250+
```sh
251251
$ tree -L 1 ./pkg/result/processors/
252252
./pkg/result/processors/
253253
├── autogenerated_exclude.go
@@ -299,7 +299,7 @@ A processor can hide issues (`nolint`, `exclude`) or change issues (`path_shorte
299299

300300
We have an abstraction for printint found issues.
301301

302-
```bash
302+
```sh
303303
$ tree -L 1 ./pkg/printers/
304304
./pkg/printers/
305305
├── checkstyle.go

docs/src/docs/contributing/website.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Netlify deploys the website to production after merging anything to a `master` b
5252

5353
Run:
5454

55-
```bash
55+
```sh
5656
npm install
5757
npm run start
5858
```
@@ -68,7 +68,7 @@ But we can add a new linter and need to change a documentation to list the linte
6868

6969
To do it run
7070

71-
```bash
71+
```sh
7272
go run ./scripts/expand_website_templates/main.go -only-state
7373
```
7474

docs/src/docs/contributing/workflow.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Fork and clone [golangci-lint](https://github.com/golangci/golangci-lint) reposi
2020

2121
A good way of making sure everything is all right is running the following:
2222

23-
```bash
23+
```sh
2424
make build
2525
./golangci-lint run -v
2626
```
@@ -29,7 +29,7 @@ make build
2929

3030
When you are satisfied with the changes, we suggest you run:
3131

32-
```bash
32+
```sh
3333
$ make test
3434
```
3535

@@ -62,12 +62,12 @@ After making a release you need to update:
6262

6363
1. GitHub [action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) by running:
6464

65-
```bash
65+
```sh
6666
make assets/github-action-config.json
6767
```
6868

6969
2. The latest version in documentation on our website:
7070

71-
```bash
71+
```sh
7272
make expand_website_templates
7373
```

docs/src/docs/product/comparison.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ We measure peak memory usage (RSS) by tracking of processes RSS every 5 ms.
4848

4949
We compare golangci-lint and gometalinter in default mode, but explicitly enable all linters because of small differences in the default configuration.
5050

51-
```bash
51+
```sh
5252
$ golangci-lint run --no-config --issues-exit-code=0 --timeout=30m \
5353
--disable-all --enable=deadcode --enable=gocyclo --enable=golint --enable=varcheck \
5454
--enable=structcheck --enable=maligned --enable=errcheck --enable=dupl --enable=ineffassign \

docs/src/docs/usage/configuration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Slice options (e.g. list of enabled/disabled linters) are combined from the comm
88

99
To see a list of enabled by your configuration linters:
1010

11-
```bash
11+
```sh
1212
golangci-lint linters
1313
```
1414

1515
## Command-Line Options
1616

17-
```bash
17+
```sh
1818
golangci-lint run -h
1919
{.RunHelpText}
2020
```

docs/src/docs/usage/install/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ It's highly recommended to install a specific version of golangci-lint available
2626

2727
Here is the recommended way to install golangci-lint {.LatestVersion}:
2828

29-
```bash
29+
```sh
3030
# binary will be $(go env GOPATH)/bin/golangci-lint
3131
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin {.LatestVersion}
3232

@@ -48,22 +48,22 @@ and is constantly being improved. For any problems with `golangci-lint`, check o
4848

4949
You can also install a binary release on macOS using [brew](https://brew.sh/):
5050

51-
```bash
51+
```sh
5252
brew install golangci/tap/golangci-lint
5353
brew upgrade golangci/tap/golangci-lint
5454
```
5555

5656
### Docker
5757

58-
```bash
58+
```sh
5959
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:{.LatestVersion} golangci-lint run -v
6060
```
6161

6262
### Install from Source
6363

6464
Go source installations are supported for the two most recent Go releases.
6565

66-
```bash
66+
```sh
6767
go get github.com/golangci/golangci-lint/cmd/golangci-lint@{.LatestVersion}
6868
```
6969

docs/src/docs/usage/linters.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Linters
44

55
To see a list of supported linters and which linters are enabled/disabled:
66

7-
```bash
7+
```sh
88
golangci-lint help linters
99
```
1010

docs/src/docs/usage/quick-start.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@ title: Quick Start
44

55
To run golangci-lint execute:
66

7-
```bash
7+
```sh
88
golangci-lint run
99
```
1010

1111
It's an equivalent of executing:
1212

13-
```bash
13+
```sh
1414
golangci-lint run ./...
1515
```
1616

1717
You can choose which directories and files to analyze:
1818

19-
```bash
19+
```sh
2020
golangci-lint run dir1 dir2/... dir3/file1.go
2121
```
2222

2323
Directories are NOT analyzed recursively. To analyze them recursively append `/...` to their path.
2424

2525
GolangCI-Lint can be used with zero configuration. By default the following linters are enabled:
2626

27-
```bash
27+
```sh
2828
$ golangci-lint help linters
2929
{.LintersCommandOutputEnabledOnly}
3030
```
3131

3232
and the following linters are disabled by default:
3333

34-
```bash
34+
```sh
3535
$ golangci-lint help linters
3636
...
3737
{.LintersCommandOutputDisabledOnly}
3838
```
3939

4040
Pass `-E/--enable` to enable linter and `-D/--disable` to disable:
4141

42-
```bash
42+
```sh
4343
golangci-lint run --disable-all -E errcheck
4444
```

0 commit comments

Comments
 (0)