From 30b6e0b8ed3c75feb6901426375fed5817ba2a3b Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 5 Apr 2024 07:48:56 +0200 Subject: [PATCH] Permit "no compiler commands" for cargo/rust projects --- NEWS | 1 + bin/blhc | 12 +++++++----- t/tests.t | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index be281fc..2fbf8bd 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ Version 0.xx - Ignore another cargo/rust false positive; reported by Yogeswaran Umasankar (see Debian Bug #1037521). +- Permit "no compiler commands" for cargo/rust projects. Version 0.14 ------------ diff --git a/bin/blhc b/bin/blhc index 56161df..99d80bf 100755 --- a/bin/blhc +++ b/bin/blhc @@ -1179,11 +1179,13 @@ foreach my $file (@ARGV) { } if (scalar @input == 0) { - if (not $option_buildd) { - print "No compiler commands!\n"; - $exit |= $exit_code{no_compiler_commands}; - } else { - print "$buildd_tag{no_compiler_commands}||\n"; + if (not $cargo) { + if (not $option_buildd) { + print "No compiler commands!\n"; + $exit |= $exit_code{no_compiler_commands}; + } else { + print "$buildd_tag{no_compiler_commands}||\n"; + } } next FILE; } diff --git a/t/tests.t b/t/tests.t index 34854e3..f80ac1a 100644 --- a/t/tests.t +++ b/t/tests.t @@ -887,8 +887,8 @@ NONVERBOSE BUILD: /bin/bash ../libtool --silent --tag=CC --mode=link gcc -Wal # cargo/rust -is_blhc 'cargo', '', 1, - $empty; +is_blhc 'cargo', '', 0, + ''; -- 2.44.1