File: check-indent

package info (click to toggle)
phoc 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,948 kB
  • sloc: ansic: 106,056; xml: 3,765; sh: 138; makefile: 33; javascript: 5
file content (17 lines) | stat: -rwxr-xr-x 241 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

export LC_ALL=C

if [ -n "$1" ]; then
    cd "$1"
fi

if [ ! -d .git ]; then
  exit 0
fi

OUT=$(git grep -l '^[ ]*	' -- src/ tests/)
if [ -n "${OUT}" ]; then
    echo "ERROR: Tab indent in '${OUT}' detected." 1>&2
    exit 1
fi