lmi
[Top][All Lists]
Advanced

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

Re: [lmi] C++ modernization


From: Vadim Zeitlin
Subject: Re: [lmi] C++ modernization
Date: Wed, 11 Jan 2017 22:10:46 +0100

On Tue, 10 Jan 2017 15:41:30 +0000 Greg Chicares <address@hidden> wrote:

[...]
GC> But, once we get past those comic asides, we come to a real problem:
GC> 
GC> /opt/lmi/src/lmi[0]$make $coefficiency check_concinnity              
GC> make[1]: Entering directory '/opt/lmi/src/lmi'
GC> make[2]: 'test_coding_rules.exe' is up to date.
GC> make[1]: Leaving directory '/opt/lmi/src/lmi'
GC>   Problems detected by xmllint:
GC>   Miscellaneous problems:
GC> File 'test_coding_rules.cpp' must not include 'config.hpp'.
GC> 
GC> Happily we observe that the regex flavor in this source is similar
GC> enough to vim's that we can just type this:
GC> 
GC> /# *include *[<\"]config.hpp[>\"]
GC> 
GC> and find six lines that now match.
GC> 
GC> I could re-cook the literals, but that's nasty. I thought of making
GC> the ten-character string {config.hpp} a macro, because it looks like
GC> it's not quoted...huh?...no, it's just that I haven't upgraded to
GC> vim++11 so relying on highlighting misled me. Maybe I could rewrite
GC> it as /[#]config.hpp/ ...
GC> 
GC> ...which led me to try to write a regex to match the set of all
GC> regexes that do not match themselves, so that we could automate the
GC> detection of problems like this...and to consider whether it would
GC> match itself...
GC> 
GC> ...and then I awoke and did what I hope is the sensible thing, but
GC> maybe you should review it nevertheless.

 I just wanted to confirm that I did review it and I agree that just
excluding test_coding_rules.cpp from this check is by far the simplest and,
hence, the best solution to this problem.

 And please accept my traditional excuses for failing to run the test after
these changes,
VZ


reply via email to

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