Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Symbol is not defined by older elfutils.
[simgrid.git] / sonar-project.properties
1 # This file is used to scan the project for issues automatically 
2 # Browse the result here: https://sonarcloud.io/organizations/simgrid/projects?sort=-size
3
4 sonar.organization=simgrid
5 sonar.projectKey=simgrid_simgrid
6 sonar.projectName=SimGrid
7 sonar.projectVersion=3.26.1
8
9 sonar.links.homepage=https://simgrid.org
10 sonar.links.issue=https://framagit.org/simgrid/simgrid/issues
11 sonar.links.scm=https://framagit.org/simgrid/simgrid/
12 # Comma-separated paths to directories with sources (required)
13 sonar.sources=src,examples,include,teshsuite
14
15
16 # Disable some rules on some files
17 sonar.issue.ignore.multicriteria=j1,j2,j3,j4,j5,jni1,jni2,c1,c2a,c2b,c3,c4,c5a,c5b,c6a,c6b,c7,c8a,c8b,c9,c10a,c10b,c10c,cex1a,cex1b,cex2a,cex2b,cex3,cex4,f1,p1,s1,s2,s3,s4,s5
18
19 # The Object.finalize() method should not be overridden
20 # But we need to clean the native memory with JNI
21 sonar.issue.ignore.multicriteria.j1.ruleKey=java:S1113
22 sonar.issue.ignore.multicriteria.j1.resourceKey=**/*.java
23
24 # Throwable.printStackTrace(...) should not be called
25 # But we don't have no better mechanism, and our Java apps are not rocket science
26 sonar.issue.ignore.multicriteria.j2.ruleKey=java:S1148
27 sonar.issue.ignore.multicriteria.j2.resourceKey=**/*.java
28
29 # Using command line arguments is security-sensitive
30 # But the authors of the applications using our library will be their only users, so there is no security concern
31 sonar.issue.ignore.multicriteria.j3.ruleKey=java:S4823
32 sonar.issue.ignore.multicriteria.j3.resourceKey=**/*.java
33
34 # Standard outputs should not be used directly to log anything
35 # But this file is used before SimGrid is initialized
36 sonar.issue.ignore.multicriteria.j4.ruleKey=java:S106
37 sonar.issue.ignore.multicriteria.j4.resourceKey=src/bindings/java/org/simgrid/NativeLib.java
38
39 # Deprecated code should be removed
40 # We do have a process to remove deprecated code
41 sonar.issue.ignore.multicriteria.j5.ruleKey=java:S1133
42 sonar.issue.ignore.multicriteria.j5.resourceKey=**/*.java
43
44 # "reinterpret_cast" should not be used
45 # But this is exactly intended to store a pointer into a long -- what we do here
46 sonar.issue.ignore.multicriteria.jni1.ruleKey=cpp:S3630
47 sonar.issue.ignore.multicriteria.jni1.resourceKey=src/bindings/java/*.cpp
48
49 # Unused function parameters should be removed
50 # But JNI mandates these parameters
51 sonar.issue.ignore.multicriteria.jni2.ruleKey=cpp:S1172
52 sonar.issue.ignore.multicriteria.jni2.resourceKey=src/bindings/java/*.cpp
53
54 # Pointers should not be cast to integral types
55 # But we need that for jMSG, smpi and other places
56 sonar.issue.ignore.multicriteria.c1.ruleKey=cpp:S1767
57 sonar.issue.ignore.multicriteria.c1.resourceKey=**/*.cpp
58
59 # Preprocessor operators "#" and "##" should not be used
60 # This poses portability issues, but we test on a large panel of architectures on purpose
61 # Until after Augustin goes to rehab, we cannot remove them all
62 sonar.issue.ignore.multicriteria.c2a.ruleKey=c:PPStringifyAndPastingUsage
63 sonar.issue.ignore.multicriteria.c2a.resourceKey=**/*
64 sonar.issue.ignore.multicriteria.c2b.ruleKey=cpp:PPStringifyAndPastingUsage
65 sonar.issue.ignore.multicriteria.c2b.resourceKey=**/*
66
67 # Macro names should comply with a naming convention
68 # But the macros in this file are named after the MPI standard
69 sonar.issue.ignore.multicriteria.c3.ruleKey=c:PPMacroName
70 sonar.issue.ignore.multicriteria.c3.resourceKey=include/smpi/smpi_extended_traces.h
71
72 # Concise syntax should be used for concatenatable namespaces
73 # This is C++17, and we still support C++14
74 sonar.issue.ignore.multicriteria.c4.ruleKey=cpp:S5812
75 sonar.issue.ignore.multicriteria.c4.resourceKey=**/*
76
77 # Replace alternative operator "not" with "!"
78 # I like it better, so please leave me alone
79 sonar.issue.ignore.multicriteria.c5a.ruleKey=cpp:S3659
80 sonar.issue.ignore.multicriteria.c5a.resourceKey=**/*.cpp
81 sonar.issue.ignore.multicriteria.c5b.ruleKey=cpp:S3659
82 sonar.issue.ignore.multicriteria.c5b.resourceKey=**/*.hpp
83
84 # Dynamically allocated memory should be released
85 # We have better ways to detect memleaks in SimGrid
86 # This is not disabled in example/ because our code should be nice looking
87 sonar.issue.ignore.multicriteria.c6a.ruleKey=cpp:S3584
88 sonar.issue.ignore.multicriteria.c6a.resourceKey=src/**/*.cpp
89 sonar.issue.ignore.multicriteria.c6b.ruleKey=cpp:S3584
90 sonar.issue.ignore.multicriteria.c6b.resourceKey=teshsuite/**/*.cpp
91
92 # Macros should not be used to define constants
93 # *.h includes are meant to be usable in C
94 sonar.issue.ignore.multicriteria.c7.ruleKey=cpp:S5028
95 sonar.issue.ignore.multicriteria.c7.resourceKey=**/*.h
96
97 # Deprecated code should be removed
98 # We do have a process to remove deprecated code
99 sonar.issue.ignore.multicriteria.c8a.ruleKey=c:S1133
100 sonar.issue.ignore.multicriteria.c8a.resourceKey=**/*
101 sonar.issue.ignore.multicriteria.c8b.ruleKey=cpp:S1133
102 sonar.issue.ignore.multicriteria.c8b.resourceKey=**/*
103
104 # Lambda return types should be implicit
105 # I don't see the point in general, plus we mostly use them when forced, to disambiguate
106 sonar.issue.ignore.multicriteria.c9.ruleKey=cpp:S3574
107 sonar.issue.ignore.multicriteria.c9.resourceKey=**/*
108
109 # Standard outputs should not be used directly to log anything
110 # Irrelevant for parsing examples
111 sonar.issue.ignore.multicriteria.c10a.ruleKey=cpp:S106
112 sonar.issue.ignore.multicriteria.c10a.resourceKey=teshsuite/s4u/evaluate-*-time/*.cpp
113 sonar.issue.ignore.multicriteria.c10b.ruleKey=cpp:S106
114 sonar.issue.ignore.multicriteria.c10b.resourceKey=teshsuite/s4u/is-router/*.cpp
115 sonar.issue.ignore.multicriteria.c10c.ruleKey=cpp:S106
116 sonar.issue.ignore.multicriteria.c10c.resourceKey=teshsuite/simdag/flatifier/*.cpp
117
118 # Declarations should be placed in a namespace
119 # But examples are intended to remain small and simple
120 sonar.issue.ignore.multicriteria.cex1a.ruleKey=cpp:GlobalNamespaceMembers 
121 sonar.issue.ignore.multicriteria.cex1a.resourceKey=examples/**/*.cpp
122 sonar.issue.ignore.multicriteria.cex1b.ruleKey=cpp:GlobalNamespaceMembers 
123 sonar.issue.ignore.multicriteria.cex1b.resourceKey=examples/**/*.hpp
124
125 # Functions which do not return should be declared as "noreturn"
126 # But examples are intended to remain small and simple
127 sonar.issue.ignore.multicriteria.cex2a.ruleKey=c:S5271
128 sonar.issue.ignore.multicriteria.cex2a.resourceKey=examples/**/*.c
129 sonar.issue.ignore.multicriteria.cex2b.ruleKey=cpp:S5271
130 sonar.issue.ignore.multicriteria.cex2b.resourceKey=examples/**/*.cpp
131
132 # Unused function parameters should be removed, but not in examples
133 sonar.issue.ignore.multicriteria.cex3.ruleKey=c:S1172
134 sonar.issue.ignore.multicriteria.cex3.resourceKey=examples/**/*.c
135
136 # no need for constness precision in examples
137 sonar.issue.ignore.multicriteria.cex4.ruleKey=c:S995
138 sonar.issue.ignore.multicriteria.cex4.resourceKey=examples/**/*.c
139
140 # "reinterpret_cast" should not be used
141 # But we need this to interface C and Fortran
142 sonar.issue.ignore.multicriteria.f1.ruleKey=cpp:S3630
143 sonar.issue.ignore.multicriteria.f1.resourceKey=src/smpi/bindings/smpi_f77*.cpp
144
145 # In Python, Using command line arguments is security-sensitive
146 # But we are cautionous with it
147 sonar.issue.ignore.multicriteria.p1.ruleKey=python:S4823
148 sonar.issue.ignore.multicriteria.p1.resourceKey=**/*.py
149
150 # In MPI, there are C function pointers
151 sonar.issue.ignore.multicriteria.s1.ruleKey=cpp:S5205
152 sonar.issue.ignore.multicriteria.s1.resourceKey=src/smpi/**/*.cpp
153
154 # MPI standard has long prototypes
155 sonar.issue.ignore.multicriteria.s2.ruleKey=cpp:S107
156 sonar.issue.ignore.multicriteria.s2.resourceKey=src/smpi/**/*.cpp
157
158 # MPI standard uses void*
159 sonar.issue.ignore.multicriteria.s3.ruleKey=cpp:S5008
160 sonar.issue.ignore.multicriteria.s3.resourceKey=src/smpi/**/*.cpp
161
162 # MPI standard uses const, sometimes const_cast is needed
163 sonar.issue.ignore.multicriteria.s4.ruleKey=cpp:S859
164 sonar.issue.ignore.multicriteria.s4.resourceKey=src/smpi/**/*.cpp
165
166 # Pointer and reference parameters should be "const" if the corresponding object is not modified
167 # AFAICT, the "constness" is required by the MPI standard and cannot be fixed.
168 sonar.issue.ignore.multicriteria.s5.ruleKey=cpp:S995
169 sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp
170
171 # Exclude some files from the analysis:
172 #  - our unit tests
173 #  - the tests that we borrowed elsewhere (MPICH and ISP)
174 #  - Flex-generated files
175 #  - Collectives that we borrowed elsewhere (mpich, openMPI and other implems)
176 #  - the NAS, that are included in our examples
177 #  - The Catch2 library, that is included in our unit tests
178 #  - The xxHash library, used by the MC
179 #  - MSG along with its examples and teshsuite, and the simdag examples
180 sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/isp/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c,src/msg/**,include/msg/**,examples/deprecated/**,teshsuite/msg/**
181
182 # Exclude our examples from the duplication detection.
183 # Examples are expected to be somehow repetitive
184 sonar.cpd.exclusions=examples/**,teshsuite/**
185
186 # The build-wrapper output dir
187 sonar.cfamily.build-wrapper-output=bw-outputs
188
189 # Allow multithreaded execution
190 sonar.cfamily.threads=4
191
192 # Where the coverage files are located
193 # See https://docs.sonarqube.org/pages/viewpage.action?pageId=5312222
194 sonar.cfamily.gcov.reportsPath=Testing/CoverageInfo
195 # Files to ignore from coverage analysis:
196 #   - foreign test suites
197 #   - examples in smpi/mc (coverage doesn't work with model checker)
198 #   - XML files
199 #   - Python files used to generate either simcalls or deployment files
200 #   - Any java source code (it's deprecated now)
201 #   - MSG (deprecated too)
202 sonar.coverage.exclusions=teshsuite/smpi/isp/**,teshsuite/smpi/mpich3-test/**,examples/smpi/mc/**,**/*.xml,src/simix/simcalls.py,**/generate.py,**/*.java,src/bindings/java/**,src/msg/**,include/msg/**,examples/deprecated/**,teshsuite/msg/**
203
204 # Encoding of the source files
205 sonar.sourceEncoding=UTF-8
206
207 # Version of the used prog languages
208 sonar.java.source=8
209 sonar.java.binaries=CMakeFiles/simgrid-java_jar.dir,examples/deprecated/java
210
211 # Don't talk to me: travis don't like your verbosity
212 # sonar.verbose=true
213
214 ### NOTE: the following properties are overridden by Jenkins configuration
215 ###
216 #sonar.java.binaries
217 #sonar.cfamily.build-wrapper-output
218 #sonar.cfamily.gcov.reportsPath
219 #sonar.python.coverage.reportPaths
220 #sonar.coverage.jacoco.xmlReportPaths
221 #sonar.cfamily.threads
222 #sonar.cfamily.cache.enabled
223 #sonar.cfamily.cache.path