From 6f66c60397d7057b7f55994da3c528e25d8b10ce Mon Sep 17 00:00:00 2001 From: tycho garen Date: Wed, 3 Nov 2021 10:00:18 -0400 Subject: [PATCH] ci: backport lint configuration changes --- .github/workflows/{lint.yaml => lint.yml} | 10 +++++----- .github/workflows/linter.yml | 6 +++--- .golangci.yml | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) rename .github/workflows/{lint.yaml => lint.yml} (79%) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yml similarity index 79% rename from .github/workflows/lint.yaml rename to .github/workflows/lint.yml index 6bb7b05b9..b808d9f77 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yml @@ -11,19 +11,19 @@ jobs: golangci: name: golangci-lint runs-on: ubuntu-latest - timeout-minutes: 4 + timeout-minutes: 8 steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v4 + - uses: actions/checkout@v2.4.0 + - uses: technote-space/get-diff-action@v5 with: PATTERNS: | **/**.go go.mod go.sum - - uses: golangci/golangci-lint-action@v2.5.1 + - uses: golangci/golangci-lint-action@v2.5.2 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.38 + version: v1.42.1 args: --timeout 10m github-token: ${{ secrets.github_token }} if: env.GIT_DIFF diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 8ece75790..7cfc7c161 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -11,6 +11,7 @@ on: branches: [master] paths: - "**.md" + - "**.yml" jobs: build: @@ -18,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v2.4.0 - name: Lint Code Base uses: docker://github/super-linter:v3 env: @@ -27,6 +28,5 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_MD: true - MARKDOWN_CONFIG_FILE: .markdownlint.yml - VALIDATE_OPAENAPI: true + VALIDATE_OPENAPI: true VALIDATE_YAML: true diff --git a/.golangci.yml b/.golangci.yml index 342b41ca4..e0f3fe163 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,6 @@ linters: enable: + - asciicheck - bodyclose - deadcode - depguard @@ -10,24 +11,25 @@ linters: # - funlen # - gochecknoglobals # - gochecknoinits + # - gocognit - goconst - - gocritic + # - gocritic # - gocyclo # - godox - gofmt - goimports - - golint + - revive - gosec - gosimple - govet - ineffassign # - interfacer - lll - - misspell # - maligned + - misspell - nakedret + - nolintlint - prealloc - # - scopelint - staticcheck - structcheck - stylecheck @@ -38,8 +40,6 @@ linters: - varcheck # - whitespace # - wsl - # - gocognit - - nolintlint issues: exclude-rules: @@ -54,9 +54,9 @@ issues: linters-settings: dogsled: max-blank-identifiers: 3 - maligned: - suggest-new: true - # govet: - # check-shadowing: true golint: min-confidence: 0 + maligned: + suggest-new: true + misspell: + locale: US