国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

cppcheck命令行參數(shù)說明

2019-11-11 02:59:06
字體:
供稿:網(wǎng)友

漢字均為翻譯 以下翻譯均采用谷歌翻譯

Syntax: 語法

    cppcheck [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.如果給出目錄而不是文件名* .cpp,*。cxx,* .cc,* .c ++,* .c,* .tpp和* .txx文件從給定目錄遞歸檢查。Options:    --cppcheck-build-dir=<dir>                         Analysis output directory. Useful for various data.                         Some possible usages are; whole PRogram analysis,

                         incremental analysis, distributed analysis.

分析輸出目錄。 有用的各種數(shù)據(jù)。                          一些可能的用法是: 整個(gè)程序分析,                          增量分析,分布式分析。

    --check-config       Check cppcheck configuration. The normal code

                         analysis is disabled by this flag.

檢查cppcheck配置。 正常代碼                          分析由此標(biāo)志禁用

    --check-library      Show information messages when library files have

                         incomplete info.

庫(kù)文件具有時(shí)顯示信息消息                          不完整的信息。

    --config-exclude=<dir>                         Path (prefix) to be excluded from configuration                         checking. Preprocessor configurations defined in                         headers (but not sources) matching the prefix will not

                         be considered for evaluation.

要從配置中排除的路徑(前綴)                          檢查。 在中定義的預(yù)處理器配置                          匹配前綴的頭(但不是源)不會(huì)                          被考慮進(jìn)行評(píng)價(jià)。

    --config-excludes-file=<file>

                         A file that contains a list of config-excludes

包含配置排除的列表的文件

    --dump               Dump xml data for each translation unit. The dump                         files have the extension .dump and contain ast,

                         tokenlist, symboldatabase, valueflow.

轉(zhuǎn)儲(chǔ)每個(gè)翻譯單元的xml數(shù)據(jù)。 轉(zhuǎn)儲(chǔ)                          文件具有擴(kuò)展名.dump并包含ast,                          tokenlist,symboldatabase,valueflow。

    -D<ID>               Define preprocessor symbol. Unless --max-configs or                         --force is used, Cppcheck will only check the given                         configuration when -D is used.

                         Example: '-DDEBUG=1 -D__cplusplus'.

定義預(yù)處理器符號(hào)。 除非--max-configs或                          --force被使用,Cppcheck只會(huì)檢查給定                          配置時(shí)使用-D。                          示例:'-DDEBUG = 1 -D__cplusplus'。

    -U<ID>               Undefine preprocessor symbol. Use -U to explicitly                         hide certain #ifdef <ID> code paths from checking.

                         Example: '-UDEBUG'

未定義預(yù)處理器符號(hào)。 使用-U顯式                          從檢查中隱藏某些#ifdef <ID>代碼路徑。                          示例:'-UDEBUG'

    -E                   Print preprocessor output on stdout and don't do any

                         further processing.

在stdout上打印預(yù)處理器輸出,不做任何操作                          進(jìn)一步處理。

    --enable=<id>        Enable additional checks. The available ids are:

啟用其他檢查。 可用的ID是:

                          * all                                  Enable all checks. It is recommended to only                                  use --enable=all when the whole program is

                                  scanned, because this enables unusedFunction.

啟用所有檢查。 建議只有                                   使用--enable = all當(dāng)整個(gè)程序是                                   掃描,因?yàn)檫@啟用unusedFunction。

                          * warning

                                  Enable warning messages

啟用警告消息

                          * style                                  Enable all coding style checks. All messages                                  with the severities 'style', 'performance' and

                                  'portability' are enabled.

啟用所有編碼風(fēng)格檢查。 所有消息                                   具有嚴(yán)重的風(fēng)格,性能和                                   '可移植性'。

                          * 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.

檢查未使用的功能。 這是推薦                                   只有當(dāng)整個(gè)程序是啟用這個(gè)                                   掃描。

                          * 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

如果有缺失包括警告。 對(duì)于                                   詳細(xì)信息,請(qǐng)使用“--check-config”。                          如果您將它們分開,可以給出幾個(gè)ids                          逗號(hào)。 另請(qǐng)參見--std

    --error-exitcode=<n> If errors are found, integer [n] is returned instead of                         the default '0'. '1' is returned                         if arguments are not valid or if no input files are                         provided. Note that your Operating system can modify

                         this value, e.g. '256' can become '0'.

如果發(fā)現(xiàn)錯(cuò)誤,則返回integer [n],而不是返回                          默認(rèn)為'0'。 返回'1'                          如果參數(shù)無效或沒有輸入文件                          提供。 注意,您的操作系統(tǒng)可以修改                          這個(gè)值,例如。 '256'可以變?yōu)?0'。

    --errorlist          Print a list of all the error messages in XML format.

以XML格式打印所有錯(cuò)誤消息的列表。

    --doc                Print a list of all available checks.

打印所有可用檢查的列表。

    --exitcode-suppressions=<file>                         Used when certain messages should be displayed but

                         should not cause a non-zero exitcode.

在應(yīng)顯示某些消息時(shí)使用                          不應(yīng)該導(dǎo)致非零退出代碼。

    --file-list=<file>   Specify the files to check in a text file. Add one                         filename per line. When file is '-,' the file list will

                         be read from standard input.

指定要在文本文件中檢查的文件。 添加一個(gè)                          filename每行。 當(dāng)文件是 - 時(shí),文件列表將                          從標(biāo)準(zhǔn)輸入讀取。

    -f, --force          Force checking of all configurations in files. If used                         together with '--max-configs=', the last option is the

                         one that is effective.

強(qiáng)制檢查文件中的所有配置。 如果使用                          加上'--max-configs =',最后一個(gè)選項(xiàng)是                          一個(gè)是有效的。

    -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.

指定搜索包含文件的路徑。 給幾個(gè)-I                          參數(shù)給出幾個(gè)路徑。 首先給定的路徑是                          首先搜索包含的頭文件。 如果路徑                          相對(duì)于源文件,這不是必需的。

    --includes-file=<file>                         Specify directory paths to search for included header                         files in a text file. Add one include path per line.                         First given path is searched for contained header                         files first. If paths are relative to source files,

                         this is not needed.

指定搜索包含的標(biāo)題的目錄路徑                          文件在文本文件中。 每行添加一個(gè)包含路徑。                          首先給定的路徑搜索包含的頭                          文件。 如果路徑相對(duì)于源文件,                          這不是必需的。

    --include=<file>                         Force inclusion of a file before the checked file. Can                         be used for example when checking the linux kernel,                         where autoconf.h needs to be included for every file                         compiled. Works the same way as the GCC -include

                         option.

強(qiáng)制在選中文件之前包含文件。 能夠                          例如在檢查L(zhǎng)inux內(nèi)核時(shí),                          其中每個(gè)文件都需要包含autoconf.h                          編譯。 工作方式與GCC相同 - 包括                          選項(xiàng)。

    -i <dir or file>     Give a source file or source file directory to exclude                         from the check. This applies only to source files so                         header files included by source files are not matched.

                         Directory name is matched to all parts of the path.

給出要排除的源文件或源文件目錄                          從檢查。 這僅適用于源文件等                          源文件包括的頭文件不匹配。                          目錄名稱與路徑的所有部分匹配。

    --inconclusive       Allow that Cppcheck reports even though the analysis is                         inconclusive.                         There are false positives with this option. Each result                         must be carefully investigated before you know if it is

                         good or bad.

即使分析是,仍允許Cppcheck報(bào)告                          不確定。                          這個(gè)選項(xiàng)有假陽(yáng)性。 每個(gè)結(jié)果                          必須仔細(xì)調(diào)查,才知道是否                          是好是壞。

    --inline-suppr       Enable inline suppressions. Use them by placing one or                         more comments, like: '// cppcheck-suppress warningId'

                         on the lines before the warning to suppress.

啟用內(nèi)聯(lián)抑制。 通過放置一個(gè)或使用它們                          更多評(píng)論,如:'// cppcheck-suppress warningId'                          在線前警告壓制。

    -j <jobs>            Start <jobs> threads to do the checking simultaneously.

啟動(dòng)<jobs>線程以同時(shí)進(jìn)行檢查。

    --language=<language>, -x <language>                         Forces cppcheck to check all files as the given

                         language. Valid values are: c, c++

強(qiáng)制cppcheck檢查所有文件作為給定                          語言。 有效值為:c,c ++

    --library=<cfg>      Load file <cfg> that contains information about types                         and functions. With such information Cppcheck                         understands your your code better and therefore you                         get better results. The std.cfg file that is                         distributed with Cppcheck is loaded automatically.                         For more information about library files, read the

                         manual.

加載包含類型信息的文件<cfg>                          和功能。 有這樣的信息Cppcheck                          理解你的代碼更好,因此你                          獲得更好的效果。 std.cfg文件是                          分發(fā)與Cppcheck自動(dòng)加載。                          有關(guān)庫(kù)文件的詳細(xì)信息,請(qǐng)閱讀                          手冊(cè)。

    --project=<file>     Run Cppcheck on project. The <file> can be a Visual                         Studio Solution (*.sln), Visual Studio Project                         (*.vcxproj), or compile database                         (compile_commands.json). The files to analyse,                         include paths, defines, platform and undefines in

                         the specified file will be used.

在項(xiàng)目上運(yùn)行Cppcheck。 <file>可以是Visual                          Studio解決方案(* .sln),Visual Studio項(xiàng)目                          (* .vcxproj),或編譯數(shù)據(jù)庫(kù)                          (compile_commands.json)。 要分析的文件,                          包括路徑,定義,平臺(tái)和未定義                          將使用指定的文件。

    --max-configs=<limit>                         Maximum number of configurations to check in a file                         before skipping it. Default is '12'. If used together                         with '--force', the last option is the one that is

                         effective.

要在文件中檢查的最大配置數(shù)                          跳過它之前。 默認(rèn)值為“12”。 如果一起使用                          與“--force”,最后一個(gè)選項(xiàng)是一個(gè)                          有效。

    --platform=<type>, --platform=<file>                         Specifies platform specific types and sizes. The                         available builtin platforms are:                          * unix32                                 32 bit unix variant                          * unix64                                 64 bit unix variant                          * win32A                                 32 bit Windows ASCII character encoding                          * win32W                                 32 bit Windows UNICODE character encoding                          * win64                                 64 bit Windows                          * native                                 Unspecified platform. Type sizes of host system

                                 are assumed, but no further assumptions.

指定平臺(tái)特定類型和大小。 的                          可用的內(nèi)置平臺(tái)有:                           * unix32                                  32位unix變體                           * unix64                                  64位unix變體                           * win32A                                  32位Windows ASCII字符編碼                           * win32W                                  32位Windows UNICODE字符編碼                           * win64                                  64位Windows                           *本機(jī)                                  未指定的平臺(tái)。 鍵入主機(jī)系統(tǒng)的大小                                  假設(shè),但沒有進(jìn)一步的假設(shè)。

    -q, --quiet          Do not show progress reports.

不顯示進(jìn)度報(bào)告。

    -rp, --relative-paths    -rp=<paths>, --relative-paths=<paths>                         Use relative paths in output. When given, <paths> are                         used as base. You can separate multiple paths by ';'.                         Otherwise path where source files are searched is used.                         We use string comparison to create relative paths, so                         using e.g. ~ for home folder does not work. It is                         currently only possible to apply the base paths to

                         files that are on a lower level in the directory tree.

在輸出中使用相對(duì)路徑。 當(dāng)給定時(shí),<路徑>是                          用作基礎(chǔ)。 您可以通過';'分隔多個(gè)路徑。                          否則使用搜索源文件的路徑。                          我們使用字符串比較創(chuàng)建相對(duì)路徑,所以                          使用。 ?為home文件夾不工作。 它是                          目前只能應(yīng)用基本路徑                          目錄樹中較低級(jí)別的文件。

    --report-progress    Report progress messages while checking a file.

檢查文件時(shí)報(bào)告進(jìn)度消息。

    --rule=<rule>        Match regular expression.

匹配正則表達(dá)式。

    --rule-file=<file>   Use given rule file. For more information, see:

                         http://sourceforge.net/projects/cppcheck/files/Articles/

使用給定的規(guī)則文件。 有關(guān)詳細(xì)信息,請(qǐng)參閱:                          http://sourceforge.net/projects/cppcheck/files/Articles/

    --std=<id>           Set standard.                         The available options are:                          * posix                                 POSIX compatible code                          * c89                                 C code is C89 compatible                          * c99                                 C code is C99 compatible                          * c11                                 C code is C11 compatible (default)                          * c++03                                 C++ code is C++03 compatible                          * c++11                                 C++ code is C++11 compatible (default)                         More than one --std can be used:

                           'cppcheck --std=c99 --std=posix file.c'

設(shè)置標(biāo)準(zhǔn)。                          可用的選項(xiàng)有:                           * posix                                  POSIX兼容代碼                           * c89                                  C代碼與C89兼容                           * c99                                  C代碼與C99兼容                           * c11                                  C代碼是C11兼容(默認(rèn))                           * c ++ 03                                  C ++代碼與C ++ 03兼容                           * c ++ 11                                  C ++代碼是C ++ 11兼容(默認(rèn))                          可以使用多個(gè)--std:                            'cppcheck --std = c99 --std = posix file.c'

    --suppress=<spec>    Suppress warnings that match <spec>. The format of                         <spec> is:                         [error id]:[filename]:[line]                         The [filename] and [line] are optional. If [error id]

                         is a wildcard '*', all error ids match.

禁止符合<spec>的警告。 格式為                          <spec>是:                          [error id]:[filename]:[line]                          [filename]和[line]是可選的。 如果[錯(cuò)誤id]                          是通配符“*”,所有錯(cuò)誤ID都匹配。

    --suppressions-list=<file>                         Suppress warnings listed in the file. Each suppression

                         is in the same format as <spec> above.

抑制文件中列出的警告。 每次抑制                          與上述<spec>格式相同。

    --template='<text>'  Format the error messages. E.g.                         '{file}:{line},{severity},{id},{message}' or                         '{file}({line}):({severity}) {message}' or                         '{callstack} {message}'

                         Pre-defined templates: gcc, vs, edit.

格式化錯(cuò)誤消息。 例如。                          '{file}:{line},{severity},{id},{message}'或                          '{file}({line}):({severity}){message}'或                          '{callstack} {message}'                          預(yù)定義模板:gcc,vs,編輯。

    -v, --verbose        Output more detailed error information.

輸出更詳細(xì)的錯(cuò)誤信息。

    --version            Print out version number.

    --xml                Write results in xml format to error stream (stderr).

將結(jié)果以xml格式寫入錯(cuò)誤流(stderr)。

    --xml-version=<version>                         Select the XML file version. Currently versions 1 and

                         2 are available. The default version is 1.

選擇XML文件版本。 目前版本1和                          2可用。 默認(rèn)版本為1。

Example usage:  # Recursively check the current folder. Print the progress on the screen and  # write errors to a file:  cppcheck . 2> err.txt  # Recursively check ../myproject/ and don't print progress:  cppcheck --quiet ../myproject/  # Check test.cpp, enable all checks:  cppcheck --enable=all --inconclusive --std=posix test.cpp  # Check f.cpp and search include files from inc1/ and inc2/:  cppcheck -I inc1/ -I inc2/ f.cppFor more information:    http://cppcheck.net/manual.pdf
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 延长县| 闵行区| 剑川县| 房山区| 巫溪县| 柘城县| 岳普湖县| 玛纳斯县| 呼伦贝尔市| 武强县| 赤壁市| 东阿县| 明光市| 罗山县| 信宜市| 高邑县| 建平县| 浦北县| 万荣县| 临沭县| 泾川县| 基隆市| 桓仁| 青河县| 达孜县| 乌拉特中旗| 开江县| 桂林市| 沭阳县| 柏乡县| 龙川县| 察雅县| 天长市| 南阳市| 离岛区| 玛纳斯县| 巫溪县| 长宁区| 临沧市| 永宁县| 图片|