qiushao@qiushao-pc:~/projects/opensources/TscanCode$ tscancode -h TscanCode - A tool for static C/C++ code analysis
Syntax: tscancode [OPTIONS] [files or paths]
If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.tpp, and *.txx files are checked recursively from the given directory.
Options: -D<ID> Define preprocessor symbol. Unless --max-configs or --force is used, TscanCode will only check the given configuration when -D is used. Example: '-DDEBUG=1 -D__cplusplus'. -U<ID> Undefine preprocessor symbol. Use -U to explicitly hide certain #ifdef <ID> code paths from checking. Example: '-UDEBUG' --enable=<id> Enable additional checks. The available ids are: * all Enable all checks. It is recommended to only use --enable=all when the whole program is scanned, because this enables unusedFunction. * warning Enable warning messages * style Enable all coding style checks. All messages with the severities 'style', 'performance' and 'portability' are enabled. * performance Enable performance messages * portability Enable portability messages * information Enable information messages * unusedFunction Check for unused functions. It is recommend to only enable this when the whole program is scanned. * missingInclude Warn if there are missing includes. For detailed information, use '--check-config'. Several ids can be given if you separate them with commas. See also --std -h, --help Print this help. -I <dir> Give path to search for include files. Give several -I parameters to give several paths. First given path is searched for contained header files first. If paths are relative to source files, this is not needed. -j <jobs> Start [jobs] threads to do the checking simultaneously. -q, --quiet Do not show progress reports. --xml Write results in xml format to error stream (stderr).
Example usage: # Recursively check the current folder. Print the progress on the screen and # write errors to a file: tscancode . 2> err.txt
qiushao@qiushao-pc:~/projects/opensources/TscanCode$ tscancode samples 2> result.txt Failed to load setting file 'cfg.xml'. File not found Failed to load library configuration file 'std.cfg'. File not found Failed to load library configuration file 'posix.cfg'. File not found Failed to load library configuration file 'windows.cfg'. File not found