Skip to content

Commit 4301229

Browse files
authored
Add lint actions (#1)
1 parent 8b09259 commit 4301229

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/linters.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Linters
2+
3+
"on":
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
yamllint:
11+
name: yamllint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: ⤵️ Check out code
15+
uses: actions/checkout@v4
16+
- name: 🚀 Run yamllint
17+
uses: reviewdog/action-yamllint@v1
18+
with:
19+
reporter: github-pr-review
20+
filter_mode: nofilter
21+
fail_on_error: true
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
markdownlint:
25+
name: markdownlint
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: ⤵️ Check out code
29+
uses: actions/checkout@v4
30+
- name: 🚀 Run markdownlint
31+
uses: reviewdog/action-markdownlint@v0
32+
with:
33+
reporter: github-pr-review
34+
filter_mode: nofilter
35+
fail_on_error: true
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
whiskers:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: ⤵️ Check out code
42+
uses: actions/checkout@v4
43+
- name: ⤵️ Setup whiskers
44+
uses: catppuccin/setup-whiskers@v1
45+
with:
46+
whiskers-version: 2.5.1
47+
- name: 🚀 Run whiskers
48+
run: |
49+
find templates/ -name "*.tera" | xargs -I {} whiskers {}
50+
- name: 🚀 Suggester / whiskers
51+
uses: reviewdog/action-suggester@v1
52+
with:
53+
tool_name: whiskers
54+
filter_mode: nofilter
55+
fail_on_error: true
56+
github_token: ${{ secrets.GITHUB_TOKEN }}

.yamllint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
extends: default
2+
rules:
3+
comments:
4+
# https://github.com/prettier/prettier/issues/6780
5+
min-spaces-from-content: 1
6+
# https://github.com/adrienverge/yamllint/issues/384
7+
comments-indentation: false
8+
document-start: disable
9+
# 160 chars was the default used by old E204 rule
10+
line-length:
11+
max: 160
12+
braces:
13+
min-spaces-inside: 0 # yamllint defaults to 0
14+
max-spaces-inside: 1 # yamllint defaults to 0
15+
octal-values:
16+
forbid-implicit-octal: true
17+
forbid-explicit-octal: true
18+
quoted-strings:
19+
quote-type: double
20+
required: only-when-needed

0 commit comments

Comments
 (0)