Add lint to ensure spaces are used for indentation
This commit is contained in:
parent
4963e04a83
commit
8bdcf243ec
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -5,12 +5,14 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
spdx:
|
lint:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Check SPDX identifiers
|
- name: Check SPDX identifiers
|
||||||
run: ./scripts/spdx.sh
|
run: ./scripts/lint/spdx.sh
|
||||||
|
- name: Check indentation
|
||||||
|
run: ./scripts/lint/indent.sh
|
||||||
|
|
||||||
tool:
|
tool:
|
||||||
strategy:
|
strategy:
|
||||||
|
6
scripts/lint/indent.sh
Executable file
6
scripts/lint/indent.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
# Check files do not use tabs for indentation
|
||||||
|
|
||||||
|
git ls-files '*.[c\|h\|rs\|sh]' | xargs grep --line-number $'^\s*\t' && exit 1
|
||||||
|
exit 0
|
Loading…
x
Reference in New Issue
Block a user