-
-
Notifications
You must be signed in to change notification settings - Fork 666
30 lines (30 loc) · 933 Bytes
/
format.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
name: "Check EditorConfig Format"
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
lint:
runs-on: "ubuntu-22.04"
steps:
- name: "Get Changed Files"
id: "files"
uses: "masesgroup/retrieve-changed-files@v2"
with:
format: "json"
- name: Check out code.
uses: actions/checkout@v2
- uses: 'actions/setup-go@v4'
with:
go-version: '1.20'
- name: "Check EditorConfig Lint"
env:
EDITORCONFIG_FLAGS: '-disable-indent-size -disable-indentation'
run: |
sudo apt install -y jq
go install 'github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@latest'
readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
~/go/bin/editorconfig-checker ${{ env.EDITORCONFIG_FLAGS }} ${changed_files[@]}