Language of file ‘Supporting Files/BridgeHeader.h‘ can not be decided as the file matches patterns o

sonarQube代码上传报错

ERROR: Error during SonarScanner execution
ERROR: Language of file 'Supporting Files/BridgeHeader.h' can not be decided as the file matches patterns of both sonar.lang.patterns.objc : **/*.h,**/*.m,**/*.mm and sonar.lang.patterns.c++ : **/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

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

2,
在sonar-project.properties中添加sonar.language=c,指定使用c插件来运行

参考链接:https://www.freesion.com/article/3192617572/

猜你喜欢

转载自blog.csdn.net/iOS_MingXing/article/details/126153998
今日推荐