-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (45 loc) · 1.15 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Lint
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: shellcheck
run: |
sudo apt-get -y install tree
dev/lint-shellcheck
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m --config .golangci.yaml
- run: go install github.com/segmentio/golines
- name: golines
uses: nickcharlton/diff-check@main
with:
command: dev/lint-golines
contracts:
name: Lint (Contracts)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: 'nightly-2044faec64f99a21f0e5f0094458a973612d0712'
- run: forge --version
- name: Run Forge fmt
# only format code, we do not want to format LIB
run: forge fmt contracts/src --check