<div class="gmail_quote">On 23 June 2010 09:36, Fons Rademakers <span dir="ltr"><<a href="mailto:Fons.Rademakers@cern.ch">Fons.Rademakers@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
we use in our C++ project a set of coding rules, like:<br>
<br>
- class names have to start with T<br>
- POD structs have to end with _t<br>
- data members have to start with f followed by upper case letter<br>
- static data members have to start with fg followed by upper case letter<br>
- ...<br>
<br>
Currently we use a third party code checker written in java, with each rule<br>
written as a small java class. The parser is not a full C++ parser, etc.<br>
Anyway, this seems like an ideal problem where clang/llvm could be the<br>
solution. Has somebody already developed such a checker using Clang? If yes<br>
can we use and modify it? If not, what would be the best way to build such<br>
a code checker, starting with adding rules to the clang-analyzer, as it has<br>
the interface we would like too (drop-in in the Makefile and outputting<br>
html files)?<br></blockquote><div><br></div><div>This sounds like it should be possible today. The convention checker in lib/Checker/LLVMConventionsChecker.cpp which may give you some ideas.</div><div><br></div><div>Nick</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers, Fons.<br>
<br>
--<br>
Org: CERN, European Laboratory for Particle Physics.<br>
Mail: 1211 Geneve 23, Switzerland<br>
E-Mail: <a href="mailto:Fons.Rademakers@cern.ch">Fons.Rademakers@cern.ch</a> Phone: +41 22 7679248<br>
WWW: <a href="http://fons.rademakers.org" target="_blank">http://fons.rademakers.org</a> Fax: +41 22 7669640<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br>