sonar-swift icon indicating copy to clipboard operation
sonar-swift copied to clipboard

Need configuration of File Suffixes

Open JosephMichels opened this issue 5 years ago • 4 comments

Most plugins allow you to modify file suffixes so you can prevent conflicts with other analyzers. Our Sonarqube server is also used to scan c/c++ projects and the objective-c portion of this plugin causes a conflict with .h files. It would be great if this feature would be added so that file extensions could be configured.

JosephMichels avatar May 03 '19 12:05 JosephMichels

Can you provide an example of such plugins?

gaelfoppolo avatar Aug 24 '19 15:08 gaelfoppolo

C++ community plugin (https://github.com/SonarOpenCommunity/sonar-cxx) provides this and other options as a tab under Administration --> General Settings --> C++ (Community). For languages directly provided/support by Sonarqube, File Suffixes is present as an option under Administration --> General Settings --> Languages -->

ramaprakashganesan avatar Jul 08 '20 13:07 ramaprakashganesan

Hello. I got absolutely same situation here, using C++ community plugin and this swift\objC plugin: ERROR: Language of file 'main/jcPKCS11f.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.objc : **/*.h,**/*.m,**/*.mm Is there any chance, that file suffixes options will be added for this plugin?

xDFCx avatar Aug 12 '20 13:08 xDFCx

My solution is to add parameter to filter one of the patterns, like: -Dsonar.lang.patterns.objc=-

feifeixiyu avatar Jan 11 '21 13:01 feifeixiyu