MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / printHelp

Method printHelp

cli/cmdlineparser.cpp:1740–2124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1738}
1739
1740void CmdLineParser::printHelp() const
1741{
1742 std::ostringstream oss;
1743 // TODO: display product name
1744 oss << "Cppcheck - A tool for static C/C++ code analysis\n"
1745 "\n"
1746 "Syntax:\n"
1747 " cppcheck [OPTIONS] [files or paths]\n"
1748 "\n"
1749 "If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.ipp,\n"
1750 "*.ixx, *.tpp, and *.txx files are checked recursively from the given directory.\n\n"
1751 "Options:\n"
1752 " --addon=<addon>\n"
1753 " Execute addon. i.e. --addon=misra. If options must be\n"
1754 " provided a json configuration is needed.\n"
1755 " --addon-python=<python interpreter>\n"
1756 " You can specify the python interpreter either in the\n"
1757 " addon json files or through this command line option.\n"
1758 " If not present, Cppcheck will try \"python3\" first and\n"
1759 " then \"python\".\n"
1760 " --cppcheck-build-dir=<dir>\n"
1761 " Cppcheck work folder. Advantages:\n"
1762 " * whole program analysis\n"
1763 " * faster analysis; Cppcheck will reuse the results if\n"
1764 " the hash for a file is unchanged.\n"
1765 " * some useful debug information, i.e. commands used to\n"
1766 " execute clang/clang-tidy/addons.\n"
1767 " --check-config Check cppcheck configuration. The normal code\n"
1768 " analysis is disabled by this flag.\n"
1769 " --check-level=<level>\n"
1770 " Configure how much valueflow analysis you want:\n"
1771 " * reduced: Reduce valueflow to finish checking quickly.\n"
1772 " * normal: Cppcheck uses some compromises in the analysis so\n"
1773 " the checking will finish in reasonable time.\n"
1774 " * exhaustive: deeper analysis that you choose when you can\n"
1775 " wait.\n"
1776 " The default choice is 'normal'.\n"
1777 " --check-library Show information messages when library files have\n"
1778 " incomplete info.\n"
1779 " --checkers-report=<file>\n"
1780 " Write a report of all the active checkers to the given file.\n"
1781 " --clang=<path> Experimental: Use Clang parser instead of the builtin Cppcheck\n"
1782 " parser. Takes the executable as optional parameter and\n"
1783 " defaults to `clang`. Cppcheck will run the given Clang\n"
1784 " executable, import the Clang AST and convert it into\n"
1785 " Cppcheck data. After that the normal Cppcheck analysis is\n"
1786 " used. You must have the executable in PATH if no path is\n"
1787 " given.\n"
1788 " --config-exclude=<dir>\n"
1789 " Path (prefix) to be excluded from configuration\n"
1790 " checking. Preprocessor configurations defined in\n"
1791 " headers (but not sources) matching the prefix will not\n"
1792 " be considered for evaluation.\n"
1793 " --config-excludes-file=<file>\n"
1794 " A file that contains a list of config-excludes\n"
1795 " --disable=<severity> Disable checks with the given severity.\n"
1796 " Please refer to the documentation of --enable for\n"
1797 " further details.\n"

Callers

nothing calls this directly

Calls 2

printRawMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected