日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

codecheck_use_record

發布時間:2023/11/27 生活经验 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 codecheck_use_record 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

      • Step 1: Integrate CodeChecker into your build system
      • Step 2: Analyze your code
      • Step 3: Run the analysis
      • Step 4: View the analysis results in the command line
      • Step 5: Hint: You can do the 1st and the 2nd step in one round by executing `check`
      • step 6: Export the reports as static HTML files

Step 1: Integrate CodeChecker into your build system

source ~/codechecker/venv/bin/activate
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ make clean
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker log --build "make depth_magic" --output ./compile_commands.json

(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker log --build "make depth_magic" --output ./compile_commands.json

Step 2: Analyze your code

Once the build is logged successfully and the compile_commands.json was created, you can analyze your project.

Step 3: Run the analysis

CodeChecker analyze ./compile_commands.json --enable sensitive --output ./reports

commond line

(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker analyze ./compile_commands.json --enable sensitive --output ./reports
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker analyze ./compile_commands.json --enable sensitive --output ./reports

cause reports files

The ./reports directory is the “database” of CodeChecker that allows to manage further working steps.

Step 4: View the analysis results in the command line

(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker parse ./reports/

Step 5: Hint: You can do the 1st and the 2nd step in one round by executing check

cd <repo root dir>/docs/examples
make clean
CodeChecker check --build "make" --output ./reports --clean \--enable sensitive

or to run on 22 threads both the compilation and the analysis:

CodeChecker check --jobs 22 --build "make clean ; make --jobs 22" \--output ./reports --clean --enable sensitive

step 6: Export the reports as static HTML files

You can visualize the results as static HTML by executing

(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker parse -e html ./reports/ -o ./reports_html

result show:

google-build-using-namespace                    | STYLE    |                54
google-explicit-constructor                     | MEDIUM   |              1134
google-global-names-in-headers                  | STYLE    |                 3
google-runtime-int                              | LOW      |               695
google-runtime-references                       | STYLE    |              2006
misc-forwarding-reference-overload              | LOW      |                 8
misc-incorrect-roundings                        | HIGH     |                58
misc-macro-parentheses                          | MEDIUM   |               384
misc-misplaced-const                            | LOW      |                 9
misc-misplaced-widening-cast                    | HIGH     |                 7
misc-redundant-expression                       | MEDIUM   |                19
misc-sizeof-container                           | HIGH     |                 3
misc-sizeof-expression                          | HIGH     |                 5
misc-suspicious-enum-usage                      | HIGH     |                 4
misc-unconventional-assign-operator             | MEDIUM   |               174
misc-unused-using-decls                         | LOW      |                 1
modernize-deprecated-headers                    | LOW      |               106
modernize-replace-auto-ptr                      | LOW      |                 1
optin.cplusplus.VirtualCall                     | MEDIUM   |                 1
performance-faster-string-find                  | LOW      |                 5
performance-inefficient-string-concatenation    | LOW      |                 1
performance-inefficient-vector-operation        | LOW      |                 2
performance-move-const-arg                      | MEDIUM   |                 5
performance-move-constructor-init               | MEDIUM   |                 1
performance-noexcept-move-constructor           | MEDIUM   |                44
performance-type-promotion-in-math-fn           | LOW      |                 1
performance-unnecessary-copy-initialization     | LOW      |                 4
performance-unnecessary-value-param             | LOW      |               113
security.FloatLoopCounter                       | MEDIUM   |                 8
unix.API                                        | MEDIUM   |                 1
unix.Malloc                                     | MEDIUM   |                 1
----------------------------------------------------------------------------------==== Severity Statistics ====----
----------------------------
Severity | Number of reports
----------------------------
HIGH     |               132
MEDIUM   |              2068
LOW      |              2332
STYLE    |              2063
----------------------------To view statistics in a browser run:
> firefox ./reports_html/statistics.htmlTo view the results in a browser run:
> firefox ./reports_html/index.html
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$

總結

以上是生活随笔為你收集整理的codecheck_use_record的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。