Any good idea to add proper header for Android C/C++ code

35 views
Skip to first unread message

butter

unread,
Mar 16, 2018, 2:43:56 AM3/16/18
to SonarQube
Hi, 

I’m new to sonarqube,and tried search doc and stackoverflow for solution, but not not get good way to reach my problem

The question is that I want to try to use sonarqube suit to see if it could help to reduce the technical debt and decouple for Android code

but the Android build system is really a big system and modules includes are not same for each module, the sonar.cxx.includeDirectories 

form sonar-project.properties file is not same for each module. even I pick -I and translate to sonar config, some header file still not recognised

by sonar runner.


warnings like this may give out the scan result to 0 , any good idea to solve the include directories adding to sonar properties ?

WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:20]: cannot find the sources for '#include <stddef.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:21]: cannot find the sources for '#include <time.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:23]: cannot find the sources for '#include <string>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:24]: cannot find the sources for '#include <vector>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:26]: cannot find the sources for '#include <android-base/logging.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:27]: cannot find the sources for '#include <android-base/macros.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/utils.h:28]: cannot find the sources for '#include <ziparchive/zip_archive.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:20]: cannot find the sources for '#include <sys/types.h>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:21]: cannot find the sources for '#include <chrono>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:22]: cannot find the sources for '#include <functional>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:23]: cannot find the sources for '#include <string>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:24]: cannot find the sources for '#include <vector>'
WARN: [/home/code/AOSP/system/extras/simpleperf/workload.h:26]: cannot find the sources for '#include <android-base/macros.h>'

G. Ann Campbell

unread,
Mar 16, 2018, 7:56:53 AM3/16/18
to SonarQube
Hi,

The property you mentioned indicates that you're using the Community C++ analyzer. You should raise your questions there.


Ann
Reply all
Reply to author
Forward
0 new messages