Supper Thomas

Results 1023 comments of Supper Thomas

1. TODO: 把formatting.py改成exe ## 如何把python脚本打包成exe ``` pyinstaller --onefile --nowindowed formatting.py ```

1. 搞一个仓库,存放所有可执行文件,添加文件路径,要区分linux和windows版本 2. 脚本拷贝替换。 3. 使用 保存版本信息,定期更新

https://github.com/supperthomas/git_auto_script

> > > 有如下情况,但是好像也是合理的,cpp check 未检查报错的那一行,编译器肯定能检查出来 > > ![image](https://user-images.githubusercontent.com/44871523/139271102-df49ebcc-f6fa-4843-9cb0-6cf8109e4488.png) 这个其实不能完全依赖cppcheck静态检查,欢迎对cppcheck的选项做出调整,这边我只是提供一种自动化的机制,具体用哪种,用不用,用户可以自行决定。

代码分析 analytics.google.com

基于cppcheck的静态测试编码规则检查 https://mp.weixin.qq.com/s/jpkeb8egdWn2nK0mh_eBEQ

-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

``` set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # cppcheck可以使用cmake文件生成的compile_commands.json,其通过命令行参数指定 # 由于实测compile_commands.json是在CMAKE_CACHEFILE_DIR目录下生成,由此有下面的代码 find_program(CPPCHECK_PROC NAMES cppcheck) if (CPPCHECK_PROC) list( APPEND CPPCHECK_CONFIG "--enable=warning,performance,information" "--project=${CMAKE_BINARY_DIR}/compile_commands.json" "--suppress=missingIncludeSystem" "--language=c++" "--std=c++11" "--bug-hunting" "--max-ctu-depth=10" "-j 4" "--output-file=${CMAKE_BINARY_DIR}/cppcheck_report.txt" ) add_custom_target(cppcheck_code_check) add_custom_command(TARGET cppcheck_code_check COMMAND...

在RT-Thread的scons基础上,使用clang-tidy做静态分析 https://club.rt-thread.org/ask/article/1b1df03e18ffc73d.html

cppcheck --project=compile_commands.json