mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Add EditorConfig file (#1022)
This commit is contained in:
parent
e4e7310c49
commit
589ef33e35
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.patch]
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[*.md,*.patch]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
|
@ -1,23 +1,41 @@
|
||||||
name: ci
|
name: ci
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
jobs:
|
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[@]}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- ubuntu-18.04
|
- ubuntu-22.04
|
||||||
- macos-latest
|
- macos-latest
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code.
|
- name: Check out code.
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Linux Install
|
- name: Linux Install
|
||||||
if: matrix.platform == 'ubuntu-18.04'
|
if: matrix.platform == 'ubuntu-22.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y bsdmainutils
|
sudo apt-get install -y bsdmainutils
|
||||||
- name: Script
|
- name: Script
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue