mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-09-21 02:17:11 +00:00
style: Add formatting rules and action
This commit is contained in:
parent
11ab9e17ea
commit
3608cd8e4e
@ -6,6 +6,8 @@ root = true
|
|||||||
# Unix-style newlines with a newline ending every file
|
# Unix-style newlines with a newline ending every file
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
# Matches multiple files with brace expansion notation
|
# Matches multiple files with brace expansion notation
|
||||||
|
25
.github/workflows/format.yml
vendored
Normal file
25
.github/workflows/format.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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
|
||||||
|
- name: "Check EditorConfig Lint"
|
||||||
|
run: |
|
||||||
|
sudo apt install -y jq golang
|
||||||
|
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 ${changed_files[@]}
|
Loading…
Reference in New Issue
Block a user