lmi
[Top][All Lists]
Advanced

[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: Vadim Zeitlin
Subject: Re: [lmi] How to work around an annoying coding rules test false positive?
Date: Tue, 18 Jun 2019 01:09:36 +0200

On Mon, 17 Jun 2019 19:29:17 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2019-06-16 16:08, Vadim Zeitlin wrote:
GC> > 
GC> >  The md5sum-related PR adds a new unit test which checks that computing 
MD5
GC> > sums products the expected output, which is defined like this:
GC> > 
GC> >   std::string const md5sums_text =
GC> >   R"(#
GC> >   00112233445566778899aabbccddeeff  test1
GC> >   ffeeddccbbaa99887766554433221100 *test2
GC> >   )"
GC> >       ;
GC> > 
GC> >  Unfortunately this results in the following warning when running "make
GC> > check_concinnity":
GC> > 
GC> > File 'md5sum_test.cpp' should fuse '*' with type: 
'ffeeddccbbaa99887766554433221100 *2test'.
GC> 
GC> In 'test_coding_rules.cpp', there's a crude but effective workaround:
GC> 
GC> bool check_reserved_name_exception(std::string const& s)
GC> {
GC>     static std::set<std::string> const z
GC>     // Taboo, and therefore uglified here.
GC>         {"D""__""W""IN32""__"
GC>         ,"_""W""IN32"
GC>         ,"__""W""IN32""__"
GC> 
GC> Would the same sort of uglification work in this case?

 Just for the record, we've finally settled on a different kind of
uglification: we can use "\x2a" instead of "*" to avoid this warning, so
this is what we will do.

 Regards,
VZ

Attachment: pgpLz7bSIsMjL.pgp
Description: PGP signature


reply via email to

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