ccanlint: rename files to match keys
ccanlint: rename structures to match keys
ccanlint: list dependencies by key Joey Adams also pointed out that we should use strings for the dependency lists. Moving them into the structure also somewhat simplifies it.
ccanlint: rename test keys Joey Adams rightly points out that the current keys are a mess: ideally the filenames, test keys and structure names in ccanlint should be the same. First step is to make the test names all regular, of basic form <noun>_<verb> (eg "tests_exist" rather than "has-tests").
ccanlint: fix segfault caused by tests not depending on the "info" test. These tests: "depends-exist" (compulsory_tests/check_depends_exist.c) "info-documentation" (tests/has_info_documentation.c) used m->info_file without checking if it was NULL, leading to a segfault when no _info file was present. Some other tests also used m->info_file without depending on "info", but are taken care of indirectly by this patch.
ccanlint: typo fix and fix errant description parsing. "C has fairly weak typing:" from check_type/_info is not a new section heading! Enforce that each word in multi-word sections must be caps.
ccanlint: rework so checks have more structure. Previously each check returned a void *, but in fact most of them fell into similar patterns. So define 'struct score' and a helper to add files to it, and use that. Under these rules, you get 0/1 if you skip a test because a dependency failed which in theory means your score (as a percentage) could drop if you fix a test.
tools/ccanlint: extract examples in separate test. This is a precursor to doing something useful with them.
ccanlint: Add -k option to keep results. Particularly useful for building tests standalone.
ccanlint: timeout, and implement -t option for quicker tests.
ccanlint: clean up test short descriptions
From: Joseph Adams <joeyadams3.14159@gmail.com> The ccanlint patch is rather intrusive. First, it adds a new field to all the ccanlint tests, "key". key is a shorter, still unique description of the test (e.g. "valgrind"). The names I chose as keys for all the tests are somewhat arbitrary and often don't reflect the name of the .c source file (because some of those names are just too darn long). Second, it adds two new options to ccanlint: -l: list tests ccanlint performs -x: exclude tests (e.g. -x trailing_whitespace,valgrind) It also adds a consistency check making sure all tests have unique keys and names. The primary goal of the ccanlint patch was so I could exclude the valgrind test, which takes a really long time for some modules (I think btree takes the longest, at around 2 minutes). I'm not sure I did it 100% correctly, so you'll want to review it first.
Fix Joey's report of rename failing across moint points.
Implementation of auto-depends, based on Idris's start.
Rename _info.c to _info: this means we can simple compile *.c.
Move ccanlint tests into subdirectories.