[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] How to work around an annoying coding rules test false positiv
From: |
Greg Chicares |
Subject: |
Re: [lmi] How to work around an annoying coding rules test false positive? |
Date: |
Mon, 17 Jun 2019 19:29:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 2019-06-16 16:08, Vadim Zeitlin wrote:
>
> The md5sum-related PR adds a new unit test which checks that computing MD5
> sums products the expected output, which is defined like this:
>
> std::string const md5sums_text =
> R"(#
> 00112233445566778899aabbccddeeff test1
> ffeeddccbbaa99887766554433221100 *test2
> )"
> ;
>
> Unfortunately this results in the following warning when running "make
> check_concinnity":
>
> File 'md5sum_test.cpp' should fuse '*' with type:
> 'ffeeddccbbaa99887766554433221100 *2test'.
In 'test_coding_rules.cpp', there's a crude but effective workaround:
bool check_reserved_name_exception(std::string const& s)
{
static std::set<std::string> const z
// Taboo, and therefore uglified here.
{"D""__""W""IN32""__"
,"_""W""IN32"
,"__""W""IN32""__"
Would the same sort of uglification work in this case?
> The real solution would be to not check the contents of strings, including
> the raw string literals, but this would require major changes to the
> test_coding_rules.cpp code.
That would be a major undertaking. A local workaround seems best for now.