3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
10 .TH "CCANLINT" "1" "12/05/2011" "\ \&" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 ccanlint \- Make CCAN code modules, and the brightness up\&.
34 \fBccanlint\fR [\fIOPTIONS\fR] [\fIDIRECTORY\fR\&...]
37 No encoder? No need to \fBccanlint\fR\&. You programmer? Excited to \fBccanlint\fR!
39 CCAN module is small code of the song\&. \fBccanlint\fR full CCAN testing tool\&. Each test spray bit of wisdom\&. Also score\&. Good score good\&. Bad bad score\&.
41 \fBccanlint\fR expect the source code in this directory, or command line can be more than one\&. Exit 0 happy if all modules all tests happy\&.
44 \fB\-v, \-\-verbose\fR
48 talkative\&. "\-vv" doing very talkative\&. "\-vvvv" make stupid talker\&.
51 \fB\-n, \-\-safe\-mode\fR
53 Do not compile anything\&. Could it be safer for the bad code, but
58 \fB\-l, \-\-list\-tests\fR
62 can do\&. Then die happy\&.
65 \fB\-\-test\-dep\-graph\fR
71 Graphviz, then die happy\&.
78 normally make mess temporary directory, but now it later in forensic\&.
81 \fB\-s, \-\-summary\fR
85 just realized there is no message unless you die horrible\&.
88 \fB\-x, \-\-exclude\fR=\fITESTNAME\fR
90 No test run\&. Can the use of time many, many do
92 very, very quickly\&. Often hatred
93 \fItests_run_valgrind\fR
94 that the test slowed\&.
97 \fB\-\-timeout\fR=\fIMILLISECONDS\fR
99 Stop the test and forget it if you take too long\&. Generally, the same works as
100 \fI\-x tests_run_valgrind\fR\&.
103 \fB\-t, \-\-target\fR=\fITESTNAME\fR
105 Do not run all tests\&. Run this test, and the proof you need\&. Used many times for many tests\&.
108 \fB\-\-compiler\fR=\fICOMPILER\fR
112 read config\&.h about finding
113 \fICCAN_COMPILER\fR\&. Otherwise use the default when it was built\&. The change, to use this compiler\&.
116 \fB\-\-cflags\fR=\fICFLAGS\fR
118 Set compiler options to compile\&. Be sure to protect spaces shell hunger\&.
122 \fBccanlint\fR many tests\&. Each test will score soon\&. Not total score for each test unless stupid module or no life\&. Worry if little or low score score after hacking\&.
124 If test break, but not repair, or maybe the dumb test, put the magic lines \fI_info\fR file like this\&. \fBccanlint\fR to score from 0 of 1 for test, but happy:
131 * // Test module foolish for me great!
132 * info_documentation_exists FAIL
133 * // Error for the file may be only
134 * tests_pass_valgrind_noleaks test/run\-mytest\&.c:FAIL
142 CCAN module must have
144 file describing\&. No this score is 0\&. However,
146 question may help to write one\&.
153 file CCAN other module without saying, must find\&. It is not score 0\&.
160 in the top dir\&. Not score 0\&.
165 Link to all objects in an object module\&. Not score 0\&.
168 \fBdepends_accurate\fR
170 Include other CCAN modules, we must say we need to
172 depends\&. Only one thing allows different, you can use
174 for testing anyway\&.
179 We try to generate the CCAN module you need\&.
184 Rather hope that the comments in the header, and
185 \fI_info\fR\&. An example of the section in each, please! Maybe more,
187 very happy morning\&.
190 \fBexamples_relevant\fR
192 Example, do not cut and paste away! You say the name of the thing in the example or
202 "#define HAVE_FEATURE" for all feature\&. Function test "#if HAVE_FEATURE" no "#ifdef HAVE_FEATURE" because user might not know about the role at all\&. Intelligent GCC flag
204 say HAVE_FEATURE not 0, not 1! but only if the use of
208 \fBinfo_documentation_exists\fR
212 file format is pretty comments\&. Copying someone\&. It is not difficult write documentation!
215 \fBinfo_summary_single_line\fR
217 Comments from a top line often describe the function or macro\&.
219 comment top line describes complete module\&. Characteristics make you scream!
224 The lawyers eat me\&.
228 in the observation and LICENSE file there\&. In general, is the link:
230 offer create a link, if they know
234 \fBlicense_comment\fR
236 Attorney everywhere\&. Please put a comment saying something like "GPL Version 4\&. Read LICENSE\&." in all source files in the directory\&.
239 \fBlicense_file_compat\fR
241 Do not lie about the license!
243 search files, see the license of another, angry here\&.
246 \fBlicense_depends_compat\fR
248 Hostile to BSD license module, but requires another module of the GPL\&. Perhaps poor encoder think all BSD code, unloading and damage attorney stick! Ay ay!
251 \fBmain_header_exists\fR
255 know the module name directory name\&. Expect the same name for header\&.
258 \fBheaders_idempotent\fR
262 many time happy\&. Rap header around easy\&.
264 say it can fix too\&. Always work\&.
267 \fBmain_header_compiles\fR
271 main header compile\&.
274 \fBavoids_cpp_reserved\fR
276 C++ programmer to include code\&. Not like them anyway, maybe, but wrong end your program, do mourn\&. Only main header compile C++ and if trying to compile C\e++ module stupid to pieces\&.
279 \fBno_trailing_whitespace\fR
281 Linux kernel programmers more, solve the problem for the space of the final ban the line\&. Now all lots of hackers working to fix it\&. Want to famous and Linux? Leave extra space too!
284 \fBexamples_compile\fR
290 from a comment in the header and
291 \fI_info\fR\&. First try to compile anything\&. If not, add many headers and maybe put inside the function\&. It does not work, adds the latest example\&. If the last example has
293 try that maybe\&. Sometimes too complicated!
297 to see why it broke\&. Or maybe bad example
304 If the example program that comments like
305 \fI// given foo outputs bar\fR
307 will run the food program
309 in the command line and standard input\&. Happy if
311 are out\&. You can do \*(Aq or " about the production or determined\&. You can also
312 \fIoutput contains\fR
313 more relaxed controls\&.
318 CCAN link to the program module simply no error\&.
321 \fBobjects_build_with_stringchecks\fR
325 is super difficult to detect errors debugging chain\&.
327 use with the module and see break!
332 You have CCAN module directory called
333 \fItest\fR\&. You have proof here\&. If there is no proof,
335 still offer make proof for you\&.
342 which has four such tests, start with different name\&.
344 compile the test files, but no link to the module, you
346 to get the bits of the module\&.
348 test compile and link with the module\&.
356 set has to break or alert\&. This good for module supposed to warn\&.
359 \fBtest_helpers_compile\fR
362 \fItest\fR? Compilation of links to all tests\&. Ask for help\&.
371 test happy departure\&. If not happy, offer debugger\&.
374 \fBtests_pass_valgrind\fR
382 slow test\&. However, we found many errors! If
388 section, make "tests_pass_valgrind test/TESTNAME:FAIL"\&. If required valgrind additional option, "tests_pass_valgrind test/TESTNAME:\-\-option"\&.
391 \fBtests_pass_valgrind_noleaks\fR
395 complain if the memory leak test\&.
397 can also be disabled\&.
400 \fBtests_compile_coverage\fR
405 test coverage\&. Fun if not here!
410 Run tests again, find lines that never try! Half of the lines 1 point 3/4 getting 2 points\&. Limit of 5 points, but the extra point for all lines of evidence\&. Not win unless the module silly or use gimmick
411 \fIccan/failtest\fR\&.
414 \fBreduce_features\fR
418 make special config\&.h turned off\&. Not stupid like HAVE_BIG_ENDIAN though!
421 \fBdepends_build_without_features\fR
423 Make modules CCAN need\&. config\&.h but not more features\&.
426 \fBobjects_build_without_features\fR
428 Make the module again, but not more features\&.
431 \fBtests_helpers_compile_without_features\fR
433 Helpers do try again, but not more features\&.
436 \fBtests_compile_without_features\fR
438 Collect the tests again, but not more features\&.
441 \fBtests_pass_without_features\fR: Run tests again, but not more features\&.
444 \fBccanlint\fR rapid change\&. The bad man, bad page\&.
447 Rusty Russell wrote \fBccanlint\fR\&. Helping others, but most break Rusty\&.
450 Main web site: http://ccodearchive\&.net/
452 Wiki: https://github\&.com/rustyrussell/ccan/wiki/
455 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&.