I’ve tried bypassing the wrapper by setting ‘sonar.cfamily.build-wrapper-output.bypass=true’ in project.properties file.
I’ve also excluded all the .c, .cpp, .java, and some other c related files.
How can I just bypass this issue? I only want to run analysis on .swift files.
You are using the 6.0 version of the CFamily analyzer, that no longer allows you to bypass the build wrapper (it was creating too many issues). So if you want to analyze C, C++ or objective-C code, you have to setup your environment so that you run the build wrapper and then use its output.
If you are only interested in Swift code, the way to go is to exclude source code from the other languages, as you already started to do. You are listing some extensions used by the CFamily analyzer, but not .h (headers) or .m (objective-C). Another option would be to use sonar.inclusions instead of sonar.exclusions to list only the extensions associated with Swift.
There is another option, that might be easier to use if you need inclusions/exclusions for another purpose: Each language has a list of file suffixes it uses to recognize its source files. So you could set those suffixes to values that do not appear in your codebase:
@JolyLoic I was wrong. When I included only the .swift in sonar.inclusions, there were 0 files analyzed because swift classes depend on libraries which have .c, .cpp, .m, .h and other CFamily files.
Now I am back to the same error! How do I fix this?
if you don’t want to analyze C/C++/Objective-C files and don’t want to see them in SonarQube, then as was already said before, you can exclude them by setting
Given the information so far provided by you, the above list is IMO exhaustive. So if it doesn’t help, then please be far more precise about what you want, what you have, what exactly you do and how? If the project is Open Source, then the simplest way will be just to show us a link on it. If not, then IMO simplest way will be to demonstrate your difficulties on “hello world” example that you’ll be able to share.