Patrick Georgi | 07408e6 | 2012-02-25 19:52:45 +0100 | [diff] [blame] | 1 | #!/bin/sh |
Alex Thiessen | d4a3d01 | 2018-01-04 20:31:29 +0000 | [diff] [blame] | 2 | |
| 3 | ## |
| 4 | ## This file is part of the coreboot project. |
| 5 | ## |
| 6 | ## Copyright (C) 2015 Patrick Georgi <patrick@georgi-clan.de> |
| 7 | ## |
| 8 | ## This program is free software; you can redistribute it and/or modify |
| 9 | ## it under the terms of the GNU General Public License as published by |
| 10 | ## the Free Software Foundation; version 2 of the License. |
| 11 | ## |
| 12 | ## This program is distributed in the hope that it will be useful, |
| 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ## GNU General Public License for more details. |
| 16 | ## |
| 17 | |
Alex Thiessen | 6719862 | 2018-01-05 05:19:10 +0000 | [diff] [blame] | 18 | set -e # -o errexit |
| 19 | set -u # -o nounset |
| 20 | |
Stefan Reinauer | b18f522 | 2015-02-11 01:53:42 +0100 | [diff] [blame] | 21 | %MAKE% lint-stable |
Martin Roth | ef86930 | 2017-07-26 10:38:42 -0600 | [diff] [blame] | 22 | |
| 23 | PATCHDIFF=$(git diff --cached) |
Alex Thiessen | ceb7788 | 2018-01-03 08:12:39 +0000 | [diff] [blame] | 24 | if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then |
Martin Roth | ef86930 | 2017-07-26 10:38:42 -0600 | [diff] [blame] | 25 | echo |
| 26 | echo "Running checkpatch" |
Alex Thiessen | ceb7788 | 2018-01-03 08:12:39 +0000 | [diff] [blame] | 27 | printf "%s\n" "$PATCHDIFF" | util/lint/checkpatch.pl --no-signoff -q - |
Martin Roth | ef86930 | 2017-07-26 10:38:42 -0600 | [diff] [blame] | 28 | fi |