-
Notifications
You must be signed in to change notification settings - Fork 20
88 lines (71 loc) · 2 KB
/
lints.yaml
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
name: Lint
on:
push:
branches:
- main
- develop
- ci/*
- feat/*
- feature/*
- hotfix/*
- release/*
pull_request:
jobs:
format:
name: Lint format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Install treefmt
run: nix profile install 'nixpkgs#treefmt'
- name: Install prettier
run: nix profile install 'nixpkgs#nodePackages.prettier'
- name: Install nixpkgs-fmt
run: nix profile install 'nixpkgs#nixpkgs-fmt'
- name: Install hclfmt
run: nix profile install 'nixpkgs#hclfmt'
- name: Install taplo
run: nix profile install 'nixpkgs#taplo'
- name: Install clang-tools
run: nix profile install 'nixpkgs#clang-tools'
- name: Run shfmt, shellcheck, checkbashisms
uses: luizm/action-sh-checker@v0.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sh_checker_shfmt_disable: true
sh_checker_comment: true
sh_checker_checkbashisms_enable: true
- name: Run treefmt
run: |
treefmt \
--allow-missing-formatter \
--fail-on-change \
--no-cache \
--formatters prettier \
--formatters clang-format \
--formatters nix \
--formatters shell \
--formatters hcl \
--formatters toml
commit:
name: Lint commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run commitlint
uses: wagoid/commitlint-github-action@v5.4.5
with:
firstParent: false
codespell:
name: Codespell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2