-
-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (54 loc) · 1.88 KB
/
fprettify-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
name: fprettify-lint
on:
push:
branches:
- master
- main
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
pull_request:
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
jobs:
fprettify:
name: fprettify-check
runs-on: ubuntu-22.04
strategy:
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install fprettify
run: |
pip3 install fprettify
- name: Check for formatting differences (src/)
run: |
if [[ $(fprettify './src/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1) ]]; then
fprettify './src/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1
exit 1
else
echo "src/ linting passed!"
fi
- name: Check for formatting differences (test/)
run: |
if [[ $(fprettify './test/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1) ]]; then
fprettify './test/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1
exit 1
else
echo "test/ linting passed!"
fi
- name: Check for formatting differences (example/)
run: |
if [[ $(fprettify './example/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1) ]]; then
fprettify './example/' --config-file ./fprettify.config -d --recursive --case 1 1 1 1
exit 1
else
echo "example/ linting passed!"
fi