From c071ded072a4f6aa9b696838a76b19aacbe40ecd Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 29 Apr 2022 08:04:28 -0700 Subject: [PATCH] run golangci-lint on all modules --- .github/workflows/linter.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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