blob: 0f1306288eacabfe87e76d73b2ce19f7d21f693d [file] [log] [blame]
Patrick Georgi07408e62012-02-25 19:52:45 +01001#!/bin/sh
Alex Thiessend4a3d012018-01-04 20:31:29 +00002
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 Thiessen67198622018-01-05 05:19:10 +000018set -e # -o errexit
19set -u # -o nounset
20
Stefan Reinauerb18f5222015-02-11 01:53:42 +010021%MAKE% lint-stable
Martin Rothef869302017-07-26 10:38:42 -060022
23PATCHDIFF=$(git diff --cached)
Alex Thiessenceb77882018-01-03 08:12:39 +000024if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then
Martin Rothef869302017-07-26 10:38:42 -060025 echo
26 echo "Running checkpatch"
Alex Thiessenceb77882018-01-03 08:12:39 +000027 printf "%s\n" "$PATCHDIFF" | util/lint/checkpatch.pl --no-signoff -q -
Martin Rothef869302017-07-26 10:38:42 -060028fi