diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 401be8a34c..77b306fe32 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -3,23 +3,31 @@ name: linter permissions: contents: read + pull-requests: read jobs: lint: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: read # for golangci/golangci-lint-action to fetch pull requests strategy: matrix: go-version: [1.x] platform: [ubuntu-latest] + + # golangci-lint will only process a single module, so we need to call it + # separately for each module in the repo. We dont lint example/newreposecretwithlibsodium + # since that needs libsodium to run. + working-directory: + - "" + - example + - scrape + - update-urls runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - - name: golangci-lint + - name: golangci-lint ${{ matrix.working-directory }} uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29 #v2.5.2 with: version: v1.44.0 + working-directory: ${{ matrix.working-directory}} args: --verbose