[ccan] ccan lint, doxygen and unit tests
Tim Post
echo at echoreply.us
Wed Feb 25 20:33:56 EST 2009
Hi,
I am soon to upload iniparser as a converted module and am correcting
some things in the original author's code.
Excessive whitespace bugs me .. so do merge conflicts resulting from
correcting those instances if I'm going to maintain the module. I'd
rather just pull patches from the author (if they make sense) apply them
cleanly and upload a new version. Yeah, I'm going to hit conflicts
anyway, but far less if I'm correcting cstyle.
If someone shares my nits, they can modify the module in place, merge
conflicts become their problem.
So, is a score of 4/5 (or after GSOC 6/10) acceptable, if the only
thing that lint complains about is whitespace?
Secondly, can we introduce a central doxyfile (I'm happy to maintain it)
so that documentation per module can be extracted? Modules that have
such comments can be easily added to this file in a uniform way.
Otherwise, each module would have its own, generated documentation would
be inconsistent at best and we're riddling the grand makefile with shell
hacks.
Finally, we have unit tests. Could someone comment a function like this
and have them generated automagically? (Rusty, please forgive the winged
comment, I'm making it compatible with doxygen)
/**
* Check if foo can bar
* @param .. yadda yadda
* @tap++
* @test ok1(foo(foo[1], foo[2]));
*/
... that may surely tickle a GSOC student :) Its not likely that they'd
accomplish it in a summer, but a good project to design. The generated
test suite would need human attention (how else could it get foo[] ?)
but:
1 - It breaks the tests totally at build time if someone forgets
something
2 - Its much easier to keep up on unit testing, (if done correctly) with
very little time involved.
Cheers,
--Tim
More information about the ccan
mailing list