Skip to content

Commit 0af50fe

Browse files
committed
Add lint action
1 parent 6308ec5 commit 0af50fe

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- lint
9+
# Replace pull_request with pull_request_target if you
10+
# plan to use this action with forks, see the Limitations section
11+
pull_request:
12+
branches:
13+
- main
14+
15+
# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
16+
permissions:
17+
checks: write
18+
contents: write
19+
20+
jobs:
21+
run-linters:
22+
name: Run linters
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Check out Git repository
27+
uses: actions/checkout@v4
28+
29+
# Install your linters here
30+
- name: Install Go
31+
run: sudo apt-get install -y golang-go
32+
33+
- name: Run linters
34+
uses: wearerequired/lint-action@v2
35+
with:
36+
gofmt: true
37+
auto_fix: true
38+
gofmt_args: "-w -s"

0 commit comments

Comments
 (0)