0
点赞
收藏
分享

微信扫一扫

SonarQube 扫描C语言文件报错


INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 28.482s
INFO: Final Memory: 14M/435M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Language of file 'print/NG00930_qd_zhx.h' can not be decided as the file matches
patterns of both sonar.lang.patterns.c++ : **/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,
**/*.hh,**/*.h and sonar.lang.patterns.c : **/*.c,**/*.h

运行到最后会报错,错误原因是不能决定使用sonar.lang.patterns.c++还是使用sonar.lang.patterns.c解析.c文件。这是因为前面安装的sonar-c-plugin和sonar-cxx-plugin插件都有对.c和.h扩展名的设置,因为我们分析的是C语言工程,可以将sonar-cxx-plugin的配置去掉,如下:

SonarQube 扫描C语言文件报错_c++


举报

相关推荐

0 条评论