Menu

Formatting issue in cppcheck manual library config table

2025-09-22
7 days ago
  • john borland

    john borland - 2025-09-22

    If you look at page 31 in the cppcheck manual https://cppcheck.sourceforge.io/manual.pdf There is a table in the library config section that looks like it didn't render as one would of expected.

     
  • john borland

    john borland - 2025-09-23

    To me it would be nice if the columns of the table were all parcelable out of the config files. If the formant had a name, short description, full description, and URL filed that might make maintaining the table easier. Also I wrote a short bash script below for getting the number of defines and functions of each config file. I think that information is useful so people can get some idea of how much is in the config files.

       cd ./cppcheck/cfg/
       echo "| Name_of_cfg_file | Num_of_Defines | Num_of_Functions |" > ./output.out.out
       find -type f -name "*.cfg" | xargs -n 1 -P 1 awk 'BEGIN{fnc=0;def=0;} /<define name=/ {def++;} /<function name=/ {fnc++;} END{print "| "FILENAME" | "def" | "fnc" |";}' >> ./output.out.out
    
       cat ./output.out.out | column -t
       rm ./output.out.out
    

    This is the output from the script

    |  Name_of_cfg_file          |  Num_of_Defines  |  Num_of_Functions  |
    |  ./cppunit.cfg             |  18              |  3                 |
    |  ./gnu.cfg                 |  36              |  95                |
    |  ./motif.cfg               |  4               |  31                |
    |  ./cppcheck-lib.cfg        |  0               |  6                 |
    |  ./ntl.cfg                 |  0               |  747               |
    |  ./embedded_sql.cfg        |  1               |  0                 |
    |  ./libcerror.cfg           |  65              |  7                 |
    |  ./zephyr.cfg              |  13              |  7                 |
    |  ./microsoft_unittest.cfg  |  17              |  0                 |
    |  ./icu.cfg                 |  213             |  0                 |
    |  ./microsoft_atl.cfg       |  36              |  0                 |
    |  ./sfml.cfg                |  0               |  48                |
    |  ./pcre.cfg                |  162             |  0                 |
    |  ./zlib.cfg                |  35              |  78                |
    |  ./googletest.cfg          |  58              |  0                 |
    |  ./wxsvg.cfg               |  0               |  2116              |
    |  ./opencv2.cfg             |  21              |  7                 |
    |  ./posix.cfg               |  43              |  411               |
    |  ./windows.cfg             |  9981            |  355               |
    |  ./std.cfg                 |  75              |  766               |
    |  ./libsigc++.cfg           |  0               |  1                 |
    |  ./boost.cfg               |  87              |  110               |
    |  ./sqlite3.cfg             |  397             |  70                |
    |  ./sdl.cfg                 |  30              |  21                |
    |  ./wxwidgets.cfg           |  5061            |  1087              |
    |  ./qt.cfg                  |  143             |  608               |
    |  ./ruby.cfg                |  0               |  12                |
    |  ./selinux.cfg             |  83              |  239               |
    |  ./gtk.cfg                 |  966             |  4365              |
    |  ./tinyxml2.cfg            |  0               |  3                 |
    |  ./python.cfg              |  46              |  49                |
    |  ./wxsqlite3.cfg           |  0               |  236               |
    |  ./openssl.cfg             |  0               |  13                |
    |  ./ginac.cfg               |  0               |  1452              |
    |  ./mfc.cfg                 |  268             |  0                 |
    |  ./avr.cfg                 |  79              |  26                |
    |  ./kde.cfg                 |  20              |  5                 |
    |  ./emscripten.cfg          |  11              |  7                 |
    |  ./bento4.cfg              |  126             |  1                 |
    |  ./vcl.cfg                 |  0               |  0                 |
    |  ./nspr.cfg                |  22              |  0                 |
    |  ./libcurl.cfg             |  1               |  32                |
    |  ./opengl.cfg              |  6               |  35                |
    |  ./openmp.cfg              |  0               |  15                |
    |  ./bsd.cfg                 |  7               |  35                |
    |  ./cairo.cfg               |  15              |  6                 |
    |  ./lua.cfg                 |  2               |  28                |
    |  ./dpdk.cfg                |  0               |  1                 |
    |  ./protobuf.cfg            |  7               |  0                 |
    |  ./microsoft_sal.cfg       |  465             |  0                 |
    
     
  • CHR

    CHR - 7 days ago

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14153

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.