[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 30ba88a 02/12: Remove check for Latin-9 from
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 30ba88a 02/12: Remove check for Latin-9 from coding rules test |
Date: |
Mon, 28 Jun 2021 18:44:27 -0400 (EDT) |
branch: master
commit 30ba88acc4de8687dd51640ca364483bb2b45ba5
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Remove check for Latin-9 from coding rules test
This test doesn't work with std::regex and is, in any case, not very
useful as what we really want is to check that the files are correctly
encoded in UTF-8.
Such check will be added later, but for now just remove the existing
check, which currently takes ~1% of the execution time.
---
test_coding_rules.cpp | 23 -----------------------
1 file changed, 23 deletions(-)
diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
index 6aa5e39..2dff4d1 100644
--- a/test_coding_rules.cpp
+++ b/test_coding_rules.cpp
@@ -306,28 +306,6 @@ void taboo
}
}
-/// Validate characters, allowing only Latin-9 and whitespace.
-///
-/// Throw if the file contains a character outside the union of
-/// ISO-8859-15 and the minimal POSIX whitespace set " \f\n\r\t\v".
-///
-/// To locate violations:
-/// LC_ALL=C grep -P '[\x00-\x08\x0e-\x1f\x7f-\x9f]' list-of-files
-
-void assay_non_latin(file const& f)
-{
- if(f.phyloanalyze("^README.schroot$"))
- {
- return;
- }
-
- static boost::regex const forbidden(R"([\x00-\x08\x0e-\x1f\x7f-\x9f])");
- if(boost::regex_search(f.data(), forbidden))
- {
- throw std::runtime_error("File contains a forbidden character.");
- }
-}
-
/// Validate whitespace.
///
/// Throw if the file contains '\f', '\r', '\t', or '\v', except in
@@ -1276,7 +1254,6 @@ statistics process_file(std::string const& file_path)
return statistics();
}
- assay_non_latin (f);
assay_whitespace (f);
check_config_hpp (f);
- [lmi-commits] [lmi] master updated (016bf00 -> 04ec593), Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master d90e9fb 01/12: Ensure that test_coding_rules exits with failure on any error, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 8882ef7 07/12: Use contains() for the lmi URL check, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 07edbd8 10/12: Document the One True nonempty d-char-sequence, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 4bcdbdb 11/12: Make a test more stringent, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 30ba88a 02/12: Remove check for Latin-9 from coding rules test,
Greg Chicares <=
- [lmi-commits] [lmi] master 0f1bc07 03/12: Split the check for canonical header guards in two parts, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master c1edfef 04/12: Use more standard regex syntax in the raw C++11 strings check, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 81c56f8 05/12: Add a test for detecting mis-sorted #include directives, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 72a9f51 06/12: Add a test for for-range declaration coding style checks, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master b719340 09/12: Reword, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master a9bc62f 08/12: Count coding-rules complaints, Greg Chicares, 2021/06/28
- [lmi-commits] [lmi] master 04ec593 12/12: Make another test more stringent, Greg Chicares, 2021/06/28