Skip to content

Commit

Permalink
Infrastructure "editorconfig conformance check 1: no tabs" (I-am-Erk#822
Browse files Browse the repository at this point in the history
)
  • Loading branch information
int-ua authored Aug 18, 2021
1 parent b30a94a commit f37e3a7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Editor configuration normalization
# https://editorconfig.org/

# See also .github/workflows/editorconfig_conformance.yml

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

Expand All @@ -17,3 +19,7 @@ indent_size = 2
[*.py]
indent_style = space
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2
35 changes: 35 additions & 0 deletions .github/workflows/editorconfig_conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: editorconfig conformance check

on:
push:
branches:
- master
paths:
- '*.json'
- '.github/workflows/editorconfig_conformance.yml'
pull_request:
branches:
- master
paths:
- '*.json'
- '.github/workflows/editorconfig_conformance.yml'

jobs:
build:
name: CI job
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Checkout base_ref
run: git fetch --depth=1 origin +${{ github.base_ref }}

- name: Verify there are no tabs in JSON and py
id: build
run: |
git diff origin/${{ github.base_ref }} --name-only '*.json' '*.py' \
| xargs -d'\n' git diff -U0 origin/${{ github.base_ref }} -- \
| grep $'^+.*\t' \
&& exit 1 \
|| exit 0

0 comments on commit f37e3a7

Please sign in to comment.