Skip to content

Commit c071ded

Browse files
committedApr 29, 2022
run golangci-lint on all modules
1 parent 97b5d95 commit c071ded

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed
 

‎.github/workflows/linter.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,31 @@ name: linter
33

44
permissions:
55
contents: read
6+
pull-requests: read
67

78
jobs:
89
lint:
9-
permissions:
10-
contents: read # for actions/checkout to fetch code
11-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1210
strategy:
1311
matrix:
1412
go-version: [1.x]
1513
platform: [ubuntu-latest]
14+
15+
# golangci-lint will only process a single module, so we need to call it
16+
# separately for each module in the repo. We dont lint example/newreposecretwithlibsodium
17+
# since that needs libsodium to run.
18+
working-directory:
19+
- ""
20+
- example
21+
- scrape
22+
- update-urls
1623
runs-on: ${{ matrix.platform }}
1724

1825
steps:
1926
- uses: actions/checkout@v3
2027

21-
- name: golangci-lint
28+
- name: golangci-lint ${{ matrix.working-directory }}
2229
uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29 #v2.5.2
2330
with:
2431
version: v1.44.0
32+
working-directory: ${{ matrix.working-directory}}
2533
args: --verbose

0 commit comments

Comments
 (0)
Please sign in to comment.