diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3c948d56..a39b921b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,21 +3,24 @@ on: push: pull_request: +permissions: + # Required: allow read access to the content for analysis. + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + pull-requests: read + # Optional: allow write access to checks to allow the action to annotate code in the PR. + checks: write + jobs: lint: name: run golangci-golint on the project runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: '^1' - - - run: go version - - - uses: actions/checkout@v3 - + go-version: 'stable' - name: golangci-golint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 - ./bin/golangci-lint run -v ./... - + uses: golangci/golangci-lint-action@v6 + with: + version: v1.64.5 diff --git a/.golangci.yml b/.golangci.yml index 56449af7..7c8a65af 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,14 +11,17 @@ linters: - unused - stylecheck -run: - skip-files: +issues: + exclude-dirs: # These were code-generated, and cannot be changed without breaking RPC compatibility. - - lambda/messages/*.go + - lambda/messages linters-settings: + staticcheck: + checks: + - all + - '-SA1029' stylecheck: - go: "1.20" checks: - "all" initialisms: