summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/checkpatch_json.py10
-rwxr-xr-xutil/lint/kconfig_lint11
-rwxr-xr-xutil/lint/lint11
-rwxr-xr-xutil/lint/lint-000-license-headers12
-rwxr-xr-xutil/lint/lint-001-no-global-config-in-romstage11
-rwxr-xr-xutil/lint/lint-007-checkpatch11
-rwxr-xr-xutil/lint/lint-008-kconfig11
-rwxr-xr-xutil/lint/lint-014-qualified-types11
-rwxr-xr-xutil/lint/lint-extended-007-checkpatch12
-rwxr-xr-xutil/lint/lint-extended-015-final-newlines11
-rwxr-xr-xutil/lint/lint-stable-003-whitespace11
-rwxr-xr-xutil/lint/lint-stable-004-style-labels11
-rwxr-xr-xutil/lint/lint-stable-008-kconfig11
-rwxr-xr-xutil/lint/lint-stable-009-old-licenses12
-rwxr-xr-xutil/lint/lint-stable-010-asm-syntax11
-rwxr-xr-xutil/lint/lint-stable-016-non-ascii11
-rwxr-xr-xutil/lint/lint-stable-017-configs11
-rwxr-xr-xutil/lint/lint-stable-018-symlinks11
-rwxr-xr-xutil/lint/lint-stable-019-header-files11
-rwxr-xr-xutil/lint/lint-stable-021-coreboot-lowercase11
-rwxr-xr-xutil/lint/lint-stable-022-clang-format12
-rwxr-xr-xutil/lint/lint-stable-023-filenames11
22 files changed, 43 insertions, 202 deletions
diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py
index 827d2f5361..7da213c7d0 100755
--- a/util/lint/checkpatch_json.py
+++ b/util/lint/checkpatch_json.py
@@ -1,13 +1,5 @@
#!/usr/bin/env python2
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
"""
This utilty generate json output to post comment in gerrit.
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index bdf9b8bb16..cd4c9a2f3b 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -1,15 +1,8 @@
#!/usr/bin/env perl
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# perltidy -l=123
package kconfig_lint;
diff --git a/util/lint/lint b/util/lint/lint
index fcce45f985..1420b41a1c 100755
--- a/util/lint/lint
+++ b/util/lint/lint
@@ -2,15 +2,8 @@
#
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
#set -x # uncomment for debug
usage () {
diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 080e6de99c..05476e87cd 100755
--- a/util/lint/lint-000-license-headers
+++ b/util/lint/lint-000-license-headers
@@ -1,16 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that files in have valid license headers
# $1 is an optional command line parameter containing directories to check
diff --git a/util/lint/lint-001-no-global-config-in-romstage b/util/lint/lint-001-no-global-config-in-romstage
index 29c9db1067..79293ebfff 100755
--- a/util/lint/lint-001-no-global-config-in-romstage
+++ b/util/lint/lint-001-no-global-config-in-romstage
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that no symbol #defined in any romstage.c is used elsewhere
DEFINES=`grep "#define" src/mainboard/*/*/romstage.c |sed 's,.*#define[\t ]\([^\t ]*\)[\t ].*,\1,' | grep -v "(" | sort -u`
diff --git a/util/lint/lint-007-checkpatch b/util/lint/lint-007-checkpatch
index 77c3907b20..a56c62b94b 100755
--- a/util/lint/lint-007-checkpatch
+++ b/util/lint/lint-007-checkpatch
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Checkpatch on .c, .h, & Kconfig files in the tree
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-008-kconfig b/util/lint/lint-008-kconfig
index 79f7146957..948031a34c 100755
--- a/util/lint/lint-008-kconfig
+++ b/util/lint/lint-008-kconfig
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: check Kconfig files for warnings and errors
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-014-qualified-types b/util/lint/lint-014-qualified-types
index 7c0409c808..4a56dd6deb 100755
--- a/util/lint/lint-014-qualified-types
+++ b/util/lint/lint-014-qualified-types
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that variables have fully qualified types
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-extended-007-checkpatch b/util/lint/lint-extended-007-checkpatch
index 80c1af5d1d..aa16caf2d6 100755
--- a/util/lint/lint-extended-007-checkpatch
+++ b/util/lint/lint-extended-007-checkpatch
@@ -1,16 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Run checkpatch on directories that are known good
PIDS=""
diff --git a/util/lint/lint-extended-015-final-newlines b/util/lint/lint-extended-015-final-newlines
index 4e72995a46..67aa27ee92 100755
--- a/util/lint/lint-extended-015-final-newlines
+++ b/util/lint/lint-extended-015-final-newlines
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that files end with a single newline
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-003-whitespace b/util/lint/lint-stable-003-whitespace
index 7943fcc411..1710083a6b 100755
--- a/util/lint/lint-stable-003-whitespace
+++ b/util/lint/lint-stable-003-whitespace
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check for superfluous whitespace in the tree
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-004-style-labels b/util/lint/lint-stable-004-style-labels
index c952b9102b..21aa69d873 100755
--- a/util/lint/lint-stable-004-style-labels
+++ b/util/lint/lint-stable-004-style-labels
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that C labels begin at start-of-line
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-008-kconfig b/util/lint/lint-stable-008-kconfig
index 778a7a57a8..34dec465c8 100755
--- a/util/lint/lint-stable-008-kconfig
+++ b/util/lint/lint-stable-008-kconfig
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: check Kconfig files for errors
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-009-old-licenses b/util/lint/lint-stable-009-old-licenses
index 369d3936f1..1835a35e14 100755
--- a/util/lint/lint-stable-009-old-licenses
+++ b/util/lint/lint-stable-009-old-licenses
@@ -1,16 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: verify that files don't have the old style header
# regex list of files and directories to exclude from the search
diff --git a/util/lint/lint-stable-010-asm-syntax b/util/lint/lint-stable-010-asm-syntax
index d532c5d28c..5f02ff567e 100755
--- a/util/lint/lint-stable-010-asm-syntax
+++ b/util/lint/lint-stable-010-asm-syntax
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that we use a single assembler syntax
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-016-non-ascii b/util/lint/lint-stable-016-non-ascii
index a9967cab2c..5bbafbbab2 100755
--- a/util/lint/lint-stable-016-non-ascii
+++ b/util/lint/lint-stable-016-non-ascii
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check for non-ASCII and unprintable characters
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-017-configs b/util/lint/lint-stable-017-configs
index 01d32b1280..1221672f6f 100755
--- a/util/lint/lint-stable-017-configs
+++ b/util/lint/lint-stable-017-configs
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check that saved config files are miniconfigs
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-018-symlinks b/util/lint/lint-stable-018-symlinks
index eddcb0579c..c9aa356f5c 100755
--- a/util/lint/lint-stable-018-symlinks
+++ b/util/lint/lint-stable-018-symlinks
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Report any symbolic links
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-019-header-files b/util/lint/lint-stable-019-header-files
index 6940227c07..8114931b29 100755
--- a/util/lint/lint-stable-019-header-files
+++ b/util/lint/lint-stable-019-header-files
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check for auto-included headers
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-021-coreboot-lowercase b/util/lint/lint-stable-021-coreboot-lowercase
index 6c6a56b60a..f9444cec90 100755
--- a/util/lint/lint-stable-021-coreboot-lowercase
+++ b/util/lint/lint-stable-021-coreboot-lowercase
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Verify that the word 'coreboot' is lowercase
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-022-clang-format b/util/lint/lint-stable-022-clang-format
index fb9388b67a..439af55a87 100755
--- a/util/lint/lint-stable-022-clang-format
+++ b/util/lint/lint-stable-022-clang-format
@@ -1,16 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Run clang-format on white-listed directories
LC_ALL=C export LC_ALL
diff --git a/util/lint/lint-stable-023-filenames b/util/lint/lint-stable-023-filenames
index 6332d2e9a2..b864ab9866 100755
--- a/util/lint/lint-stable-023-filenames
+++ b/util/lint/lint-stable-023-filenames
@@ -1,15 +1,8 @@
#!/bin/sh
# This file is part of the coreboot project.
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# SPDX-License-Identifier: GPL-2.0-only
+
# DESCR: Check for illegal characters in filename
LC_ALL=C export LC_ALL