[PATCH] tags: fix "config ..." false positives

From: Alexey Dobriyan
Date: Sun Oct 20 2019 - 12:49:25 EST


"config" regex is too loose, giving a few false positives

CONFIG_and drivers/pci/controller/Kconfig /^ config and MMIO accesses.$/;" r
CONFIG_option arch/x86/Kconfig /^ config option.$/;" r
CONFIG_option init/Kconfig /^ config option determines the parameter's default value.$/;" r
and drivers/pci/controller/Kconfig /^ config and MMIO accesses.$/;" r
option arch/x86/Kconfig /^ config option.$/;" r
option init/Kconfig /^ config option determines the parameter's default value.$/;" r

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---

scripts/tags.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -213,8 +213,8 @@ regex_c=(
'/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/'
)
regex_kconfig=(
- '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/'
- '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/CONFIG_\2/'
+ '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)$/\2/'
+ '/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)$/CONFIG_\2/'
)
setup_regex()
{