Checking for Inline Methods (Was: KUrl(QString) fix)

Allen Winter winter at kde.org
Wed Jan 3 02:40:46 GMT 2007


On Saturday, December 30, 2006 01:51:45 PM Aaron J. Seigo wrote:
> On Saturday 30 December 2006 4:14, Adriaan de Groot wrote:
> > What's the license on those shell commands? If there's a policy of "no
> > inlines in libs" then we should add a krazy check for it.
> 
> that'd be great. i can then spend one of my libs mondays fixing all the 
> inlines in public API (or, as leo referred to them, interfaces =)
> 
> hm.. and to tell the difference it might even make sense to do this check 
> against installed headers with *EXPORT macros so we know the symbols in the 
> class are supposed to be visible.
> 
My attempt at a Krazy plugin to check for inline methods within a public,
FOO_EXPORTed class will be installed tonight, and run on the EBN machine
soon thereafter. 

You can tell Krazy to ignore the inline check on a line with a comment like:
  inline int bigMarkDistance() const;  // krazy:exclude=include

or, if you want a comment that is more human-readable:
  inline bool isEmpty() const { return actions().isEmpty(); }  // keep this inline

This will run in all source modules, not just kdelibs.  We'll see how it goes.
Please take a look at the Krazy reports and let me know.
http://www.englishbreakfastnetwork.org/krazy/index.php

Regards,
Allen






-- 
This is my KDE signature




More information about the kde-core-devel mailing list