]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Permit "no compiler commands" for cargo/rust projects
authorSimon Ruderich <simon@ruderich.org>
Fri, 5 Apr 2024 05:48:56 +0000 (07:48 +0200)
committerSimon Ruderich <simon@ruderich.org>
Fri, 5 Apr 2024 05:48:56 +0000 (07:48 +0200)
NEWS
bin/blhc
t/tests.t

diff --git a/NEWS b/NEWS
index be281fc20295863b6fcb99d27f1ab46b395c1b5e..2fbf8bd2d04eea1557a30c6791454cdc40416f39 100644 (file)
--- 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
 ------------
index 56161df8eee5d1aa4d7b8a71b59287e40c097733..99d80bfc84da5468f6ec9bed710576d231c8becc 100755 (executable)
--- 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;
     }
index 34854e3a9be2c7841801a740d8ae103662338c32..f80ac1aed52e4ba76e560ea5a49eb7f83eedf8a0 100644 (file)
--- 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,
+        '';