Skip to content
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

Fix syntax highlighting for bash scripts #1151

Merged
merged 1 commit into from May 18, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/docs/contributing/architecture.mdx
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/contributing/website.mdx
Expand Up @@ -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
```
Expand All @@ -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
```

Expand Down
8 changes: 4 additions & 4 deletions docs/src/docs/contributing/workflow.mdx
Expand Up @@ -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
```
Expand All @@ -29,7 +29,7 @@ make build

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

```bash
```sh
$ make test
```

Expand Down Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion docs/src/docs/product/comparison.mdx
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/usage/configuration.mdx
Expand Up @@ -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}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/src/docs/usage/install/index.mdx
Expand Up @@ -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}

Expand All @@ -48,22 +48,22 @@ 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
```

### Install from Source

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

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/usage/linters.mdx
Expand Up @@ -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
```

Expand Down
12 changes: 6 additions & 6 deletions docs/src/docs/usage/quick-start.mdx
Expand Up @@ -4,41 +4,41 @@ 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
```

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

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

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

```bash
```sh
golangci-lint run --disable-all -E errcheck
```