-
Notifications
You must be signed in to change notification settings - Fork 173
97 lines (79 loc) · 2.26 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Static analysis
on: push
jobs:
# Run linter and format checkers independently, so you see errors from both.
linter-check:
name: linter-check
runs-on: ubuntu-latest
container: ghcr.io/fossas/haskell-dev-tools:9.8.2
steps:
- uses: dtolnay/rust-toolchain@stable
with:
components: "clippy,rustfmt"
- uses: actions/checkout@v4
- name: Run hlint
run: |
make lint
link-check:
name: link-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
config-file: ".markdown-link-check.json"
- name: Disallow empty Markdown links
run: |
! grep ']()' **/*.md
format-check:
name: formatter-check
runs-on: ubuntu-latest
container: ghcr.io/fossas/haskell-dev-tools:9.8.2
steps:
- uses: dtolnay/rust-toolchain@stable
with:
components: "clippy,rustfmt"
- uses: actions/checkout@v4
# Run the formatter
- name: run fourmolu
run: |
make check-fmt
cabal-format-check:
name: cabal-format-check
runs-on: ubuntu-latest
container: ghcr.io/fossas/haskell-dev-tools:9.8.2
steps:
- uses: actions/checkout@v4
# Run the formatter
- name: "run cabal-fmt"
run: |
cabal-fmt --check spectrometer.cabal
schema-lint-check:
name: "schema lint check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "docs.*\\.schema\\.json$"
common-verbiage-check:
name: "Check for correct spelling of FOSSA"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Check for incorrect FOSSA wording"
run: |
! grep 'Fossa ' **/*.md
shellcheck-check:
name: "Lint bash scripts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: run shellcheck
uses: sudo-bot/action-shellcheck@latest
with:
# https://github.com/koalaman/shellcheck#how-to-use
cli-args: "*.sh"