Attention is currently required from: Martin Roth. Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52068 )
Change subject: util/kconfig_lint: Update handle_expressions() ......................................................................
util/kconfig_lint: Update handle_expressions()
More relational operators were added to Kconfig in 2015. Now we can make use of them.
Change-Id: I640e5c3ee1485348f09fcb0b0d5035eb53a2c98e Signed-off-by: Nico Huber nico.h@gmx.de --- M util/lint/kconfig_lint 1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/52068/1
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 51cc226..b72d34a 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -988,20 +988,26 @@ my $balanced = qr/((?:$parens|$quotes|[^()"])+)/;
if ( $exprline =~ /^\s*$balanced\s*(?:|||&&)\s*(.+)$/ ) { - # <expr> '||' <expr>, <expr> '&&' <expr> (7)(6) + # <expr> '||' <expr>, <expr> '&&' <expr> (8)(7) my ( $lhs, $rhs ) = ( $1, $3 ); handle_expressions( $lhs, $inside_config, $filename, $line_no ); handle_expressions( $rhs, $inside_config, $filename, $line_no ); } elsif ( $exprline =~ /^\s*!(.+)$/ ) { - # '!' <expr> (5) + # '!' <expr> (6) handle_expressions( $1, $inside_config, $filename, $line_no ); } elsif ( $exprline =~ /^\s*$parens\s*$/ ) { - # '(' <expr> ')' (4) + # '(' <expr> ')' (5) $exprline =~ /^\s*((.*))\s*$/; handle_expressions( $1, $inside_config, $filename, $line_no ); } + elsif ( $exprline =~ /^\s*($quotes|[^"\s]+)\s*[<>]=?$strip$/ ) { + # <symbol> '<' <symbol>, <symbol> '<=' <symbol>, etc. (4) + my ( $lhs, $rhs ) = ( $1, $2 ); + handle_symbol( $lhs, $filename, $line_no ); + handle_symbol( $rhs, $filename, $line_no ); + } elsif ( $exprline =~ /^\s*($quotes|[^"\s]+)\s*!=$strip$/ ) { # <symbol> '!=' <symbol> (3) my ( $lhs, $rhs ) = ( $1, $2 );