lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 81c56f8 05/12: Add a test for detecting mis-s


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 81c56f8 05/12: Add a test for detecting mis-sorted #include directives
Date: Mon, 28 Jun 2021 18:44:27 -0400 (EDT)

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

    Add a test for detecting mis-sorted #include directives
    
    Verify that the check for the include directives being sorted
    alphabetically works as expected.
---
 test_coding_rules_test.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test_coding_rules_test.sh b/test_coding_rules_test.sh
index 8754635..a65b373 100755
--- a/test_coding_rules_test.sh
+++ b/test_coding_rules_test.sh
@@ -237,6 +237,15 @@ Uses the only allowed non-empty d-char-seq.
 auto const not_ok = R"==(disallowed)==";
 EOF
 
+cat >eraseme_cpp_006.cpp <<EOF
+$boilerplate
+
+#include "foo.hpp"
+#include "bar.hpp"
+
+#include <baz>
+EOF
+
 # Headers.
 
 cat >eraseme_hpp_000.hpp <<EOF
@@ -418,6 +427,9 @@ File 'eraseme_cpp_003.cpp' should fuse '*' with type: 'int 
*x;     // x is a 'po
 File 'eraseme_cpp_004.cpp' should write 'const' after the type it modifies: 
'const T&'.
 File 'eraseme_cpp_004.cpp' should write 'const' after the type it modifies: 
'const std::string&'.
 File 'eraseme_cpp_005.cpp' contains noncanonical d-char-seq: '=='. Instead, 
use '--cut-here--'.
+File 'eraseme_cpp_006.cpp' has missorted #include directives:
+#include "foo.hpp"
+#include "bar.hpp"
 File 'eraseme_hpp_001.hpp' lacks end part of the canonical header guard.
 File 'eraseme_hpp_002.hpp' lacks start part of the canonical header guard.
 File 'eraseme_hpp_003.hpp' lacks start part of the canonical header guard.



reply via email to

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