lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master d90e9fb 01/12: Ensure that test_coding_rules


From: Greg Chicares
Subject: [lmi-commits] [lmi] master d90e9fb 01/12: Ensure that test_coding_rules exits with failure on any error
Date: Mon, 28 Jun 2021 18:44:27 -0400 (EDT)

branch: master
commit d90e9fb00109220767532fa42a31ee3d3ffb3efb
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Ensure that test_coding_rules exits with failure on any error
    
    Don't exit with success exit status if any errors were reported.
---
 test_coding_rules.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
index 690099f..6aa5e39 100644
--- a/test_coding_rules.cpp
+++ b/test_coding_rules.cpp
@@ -259,8 +259,11 @@ bool file::phyloanalyze(std::string const& s) const
     return boost::regex_search(file_name(), boost::regex(s));
 }
 
+bool error_flag = false;
+
 void complain(file const& f, std::string const& complaint)
 {
+    error_flag = true;
     std::cout << "File '" << f.full_name() << "' " << complaint << std::endl;
 }
 
@@ -1294,7 +1297,6 @@ statistics process_file(std::string const& file_path)
 
 int try_main(int argc, char* argv[])
 {
-    bool error_flag = false;
     statistics z;
     for(int j = 1; j < argc; ++j)
         {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]