File: style.sh

package info (click to toggle)
libva 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,008 kB
  • sloc: ansic: 18,657; xml: 633; makefile: 356; sh: 117; perl: 41
file content (18 lines) | stat: -rwxr-xr-x 276 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

set -euo pipefail

modified_lines=$(git status --short -uno | wc -l)
(( modified_lines == 0 )) && exit 0

echo >&2
echo >&2 "ERROR: Style changes detected"
echo >&2

git diff

echo >&2
echo >&2 "ERROR: Squash the above changes as needed"
echo >&2

exit 1