github.com/neilotoole/jsoncolor@v0.7.2-0.20231115150201-1637fae69be1/.github/workflows/golangci-lint.yml (about) 1 name: golangci-lint 2 on: 3 push: 4 paths-ignore: 5 - '**.md' 6 pull_request: 7 paths-ignore: 8 - '**.md' 9 10 permissions: 11 contents: read 12 # Optional: allow read access to pull request. Use with `only-new-issues` option. 13 pull-requests: read 14 15 jobs: 16 golangci: 17 name: lint 18 runs-on: ubuntu-latest 19 steps: 20 - uses: actions/checkout@v3 21 - uses: actions/setup-go@v4 22 with: 23 go-version: ">= 1.16" 24 cache: false 25 - name: golangci-lint 26 uses: golangci/golangci-lint-action@v3 27 with: 28 # Require: The version of golangci-lint to use. 29 # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. 30 # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. 31 version: v1.54 32 33 # Optional: working directory, useful for monorepos 34 # working-directory: somedir 35 36 # Optional: golangci-lint command line arguments. 37 # 38 # Note: By default, the `.golangci.yml` file should be at the root of the repository. 39 # The location of the configuration file can be changed by using `--config=` 40 # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 41 42 # We're explicitly setting the exit code to 0 because we don't want the CI to fail 43 # if there are linting errors right now (because there's a bunch of linting errors!) 44 # Ultimately we want to set the exit code to 1. 45 args: --issues-exit-code=1 --out-format=colored-line-number 46 47 # Optional: show only new issues if it's a pull request. The default value is `false`. 48 # only-new-issues: true 49 50 # Optional: if set to true, then all caching functionality will be completely disabled, 51 # takes precedence over all other caching options. 52 # skip-cache: true 53 54 # Optional: if set to true, then the action won't cache or restore ~/go/pkg. 55 # skip-pkg-cache: true 56 57 # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. 58 # skip-build-cache: true 59 60 # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. 61 # install-mode: "goinstall"