summaryrefslogtreecommitdiffstats
path: root/admin/nolonglines
blob: 48d1c7d7f4c1a7f13cd57672b09b556d09cb9f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

files_with_long_lines=$(./admin/findphp |
            xargs -l1 wc -L |
            awk '$1 > 80 { print $2 }' |
            xargs -l1 --replace=FILENAME /usr/bin/env perl admin/longlines.pl FILENAME 80)

if [ "$files_with_long_lines" ]
    then
    cat <<EOF 1>&2
Found lines > 80 characters in:

$files_with_long_lines
EOF
    exit 1
fi