blob: e8a3beae8dec04a3821622bcdd3a786246a6d6c8 [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env sh
Martin Roth5a70d6b2016-01-31 15:17:34 -07002#
Patrick Georgi7333a112020-05-08 20:48:04 +02003# SPDX-License-Identifier: GPL-2.0-only
4
Angel Pons04bf41b2020-10-13 01:07:27 +02005# DESCR: Check Kconfig files for errors
Martin Roth5a70d6b2016-01-31 15:17:34 -07006
Martin Rothd81debd2022-06-03 00:06:57 -06007LINTDIR="$(
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 Roth5a70d6b2016-01-31 15:17:34 -070014
15# Verify that the test can run, tell users the issue
16if [ -z "$(command -v perl)" ]; then
17 echo "The kconfig lint tool uses perl. Please install it to run this test."
18fi
19
Martin Rothd81debd2022-06-03 00:06:57 -060020# Check whether coreboot is in a repo
21if [ "${IN_GIT_TREE}" -eq 1 ]; then
Martin Rothb1bca882016-03-02 13:19:07 -070022 env perl util/lint/kconfig_lint --warnings_off 2>&1
Martin Roth5a70d6b2016-01-31 15:17:34 -070023else
Martin Rothb1bca882016-03-02 13:19:07 -070024 env perl util/lint/kconfig_lint --no_git_grep --warnings_off 2>&1
Martin Roth5a70d6b2016-01-31 15:17:34 -070025fi