Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Martin Roth | 5a70d6b | 2016-01-31 15:17:34 -0700 | [diff] [blame] | 2 | # |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
Angel Pons | 04bf41b | 2020-10-13 01:07:27 +0200 | [diff] [blame] | 5 | # DESCR: Check Kconfig files for errors |
Martin Roth | 5a70d6b | 2016-01-31 15:17:34 -0700 | [diff] [blame] | 6 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 7 | LINTDIR="$( |
| 8 | cd -- "$(dirname "$0")" > /dev/null 2>&1 || return |
| 9 | pwd -P |
| 10 | )" |
| 11 | |
| 12 | # shellcheck source=helper_functions.sh |
| 13 | . "${LINTDIR}/helper_functions.sh" |
Martin Roth | 5a70d6b | 2016-01-31 15:17:34 -0700 | [diff] [blame] | 14 | |
| 15 | # Verify that the test can run, tell users the issue |
| 16 | if [ -z "$(command -v perl)" ]; then |
| 17 | echo "The kconfig lint tool uses perl. Please install it to run this test." |
| 18 | fi |
| 19 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 20 | # Check whether coreboot is in a repo |
| 21 | if [ "${IN_GIT_TREE}" -eq 1 ]; then |
Martin Roth | b1bca88 | 2016-03-02 13:19:07 -0700 | [diff] [blame] | 22 | env perl util/lint/kconfig_lint --warnings_off 2>&1 |
Martin Roth | 5a70d6b | 2016-01-31 15:17:34 -0700 | [diff] [blame] | 23 | else |
Martin Roth | b1bca88 | 2016-03-02 13:19:07 -0700 | [diff] [blame] | 24 | env perl util/lint/kconfig_lint --no_git_grep --warnings_off 2>&1 |
Martin Roth | 5a70d6b | 2016-01-31 15:17:34 -0700 | [diff] [blame] | 25 | fi |