Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'simgrid-platform_robustness'
[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.31.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,jni1,jni2,c1,c2a,c2b,c3,c5a,c5b,c6a,c6b,c7,c8,c9,c10a,c10b,c10c,cex1a,cex1b,cex2a,cex2b,cex3,cex4,cxx17a,cxx17b,cxx17c,cxx17d,cxx17e,cxx17f,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 # "reinterpret_cast" should not be used
40 # But this is exactly intended to store a pointer into a long -- what we do here
41 sonar.issue.ignore.multicriteria.jni1.ruleKey=cpp:S3630
42 sonar.issue.ignore.multicriteria.jni1.resourceKey=src/bindings/java/*.cpp
43
44 # Unused function parameters should be removed
45 # But JNI mandates these parameters
46 sonar.issue.ignore.multicriteria.jni2.ruleKey=cpp:S1172
47 sonar.issue.ignore.multicriteria.jni2.resourceKey=src/bindings/java/*.cpp
48
49 # Pointers should not be cast to integral types
50 # But we need that for jMSG, smpi and other places
51 sonar.issue.ignore.multicriteria.c1.ruleKey=cpp:S1767
52 sonar.issue.ignore.multicriteria.c1.resourceKey=**/*.cpp
53
54 # Preprocessor operators "#" and "##" should not be used
55 # This poses portability issues, but we test on a large panel of architectures on purpose
56 # Until after Augustin goes to rehab, we cannot remove them all
57 sonar.issue.ignore.multicriteria.c2a.ruleKey=c:PPStringifyAndPastingUsage
58 sonar.issue.ignore.multicriteria.c2a.resourceKey=**/*
59 sonar.issue.ignore.multicriteria.c2b.ruleKey=cpp:PPStringifyAndPastingUsage
60 sonar.issue.ignore.multicriteria.c2b.resourceKey=**/*
61
62 # Macro names should comply with a naming convention
63 # But the macros in this file are named after the MPI standard
64 sonar.issue.ignore.multicriteria.c3.ruleKey=c:PPMacroName
65 sonar.issue.ignore.multicriteria.c3.resourceKey=include/smpi/smpi_extended_traces.h
66
67 # Replace alternative operator "not" with "!"
68 # I like it better, so please leave me alone
69 sonar.issue.ignore.multicriteria.c5a.ruleKey=cpp:S3659
70 sonar.issue.ignore.multicriteria.c5a.resourceKey=**/*.cpp
71 sonar.issue.ignore.multicriteria.c5b.ruleKey=cpp:S3659
72 sonar.issue.ignore.multicriteria.c5b.resourceKey=**/*.hpp
73
74 # Dynamically allocated memory should be released
75 # We have better ways to detect memleaks in SimGrid
76 # This is not disabled in example/ because our code should be nice looking
77 sonar.issue.ignore.multicriteria.c6a.ruleKey=cpp:S3584
78 sonar.issue.ignore.multicriteria.c6a.resourceKey=src/**/*.cpp
79 sonar.issue.ignore.multicriteria.c6b.ruleKey=cpp:S3584
80 sonar.issue.ignore.multicriteria.c6b.resourceKey=teshsuite/**/*.cpp
81
82 # Macros should not be used to define constants
83 # *.h includes are meant to be usable in C
84 sonar.issue.ignore.multicriteria.c7.ruleKey=cpp:S5028
85 sonar.issue.ignore.multicriteria.c7.resourceKey=**/*.h
86
87 # Deprecated code should be removed
88 # We do have a process to remove deprecated code
89 sonar.issue.ignore.multicriteria.c8.ruleKey=*:S1133
90 sonar.issue.ignore.multicriteria.c8.resourceKey=**/*
91
92 # Lambda return types should be implicit
93 # I don't see the point in general, plus we mostly use them when forced, to disambiguate
94 sonar.issue.ignore.multicriteria.c9.ruleKey=cpp:S3574
95 sonar.issue.ignore.multicriteria.c9.resourceKey=**/*
96
97 # Standard outputs should not be used directly to log anything
98 # Irrelevant for parsing examples
99 sonar.issue.ignore.multicriteria.c10a.ruleKey=cpp:S106
100 sonar.issue.ignore.multicriteria.c10a.resourceKey=teshsuite/s4u/evaluate-*-time/*.cpp
101 sonar.issue.ignore.multicriteria.c10b.ruleKey=cpp:S106
102 sonar.issue.ignore.multicriteria.c10b.resourceKey=teshsuite/s4u/is-router/*.cpp
103 sonar.issue.ignore.multicriteria.c10c.ruleKey=cpp:S106
104 sonar.issue.ignore.multicriteria.c10c.resourceKey=teshsuite/platforms/*.cpp
105
106 # Declarations should be placed in a namespace
107 # But examples are intended to remain small and simple
108 sonar.issue.ignore.multicriteria.cex1a.ruleKey=cpp:GlobalNamespaceMembers
109 sonar.issue.ignore.multicriteria.cex1a.resourceKey=examples/**/*.cpp
110 sonar.issue.ignore.multicriteria.cex1b.ruleKey=cpp:GlobalNamespaceMembers
111 sonar.issue.ignore.multicriteria.cex1b.resourceKey=examples/**/*.hpp
112
113 # Functions which do not return should be declared as "noreturn"
114 # But examples are intended to remain small and simple
115 sonar.issue.ignore.multicriteria.cex2a.ruleKey=c:S5271
116 sonar.issue.ignore.multicriteria.cex2a.resourceKey=examples/**/*.c
117 sonar.issue.ignore.multicriteria.cex2b.ruleKey=cpp:S5271
118 sonar.issue.ignore.multicriteria.cex2b.resourceKey=examples/**/*.cpp
119
120 # Unused function parameters should be removed, but not in examples
121 sonar.issue.ignore.multicriteria.cex3.ruleKey=c:S1172
122 sonar.issue.ignore.multicriteria.cex3.resourceKey=examples/**/*.c
123
124 # no need for constness precision in examples
125 sonar.issue.ignore.multicriteria.cex4.ruleKey=c:S995
126 sonar.issue.ignore.multicriteria.cex4.resourceKey=examples/**/*.c
127
128 # Ignore these C++17 rules in public headers, where we still support C++14
129
130 # C++17: Concise syntax should be used for concatenatable namespaces
131 sonar.issue.ignore.multicriteria.cxx17a.ruleKey=cpp:S5812
132 sonar.issue.ignore.multicriteria.cxx17a.resourceKey=include/**/*
133 # C++17: "if","switch", and range-based for loop initializer should be used to reduce scope of variables
134 sonar.issue.ignore.multicriteria.cxx17b.ruleKey=cpp:S6004
135 sonar.issue.ignore.multicriteria.cxx17b.resourceKey=include/**/*.hpp
136 # C++17: Structured binding should be used
137 sonar.issue.ignore.multicriteria.cxx17c.ruleKey=cpp:S6005
138 sonar.issue.ignore.multicriteria.cxx17c.resourceKey=include/**/*.hpp
139 # C++17: "std::string_view" should be used to pass a read-only string to a function
140 sonar.issue.ignore.multicriteria.cxx17d.ruleKey=cpp:S6009
141 sonar.issue.ignore.multicriteria.cxx17d.resourceKey=include/**/*.hpp
142 # C++17: Redundant class template arguments should not be used
143 sonar.issue.ignore.multicriteria.cxx17e.ruleKey=cpp:S6012
144 sonar.issue.ignore.multicriteria.cxx17e.resourceKey=include/**/*.hpp
145 # C++17: The "_t" and "_v" version of type traits should be used instead of "::type" and "::value"
146 sonar.issue.ignore.multicriteria.cxx17f.ruleKey=cpp:S6020
147 sonar.issue.ignore.multicriteria.cxx17f.resourceKey=include/**/*.hpp
148
149 # "reinterpret_cast" should not be used
150 # But we need this to interface C and Fortran
151 sonar.issue.ignore.multicriteria.f1.ruleKey=cpp:S3630
152 sonar.issue.ignore.multicriteria.f1.resourceKey=src/smpi/bindings/smpi_f77*.cpp
153
154 # In Python, Using command line arguments is security-sensitive
155 # But we are cautionous with it
156 sonar.issue.ignore.multicriteria.p1.ruleKey=python:S4823
157 sonar.issue.ignore.multicriteria.p1.resourceKey=**/*.py
158
159 # In MPI, there are C function pointers
160 sonar.issue.ignore.multicriteria.s1.ruleKey=cpp:S5205
161 sonar.issue.ignore.multicriteria.s1.resourceKey=src/smpi/**/*.cpp
162
163 # MPI standard has long prototypes
164 sonar.issue.ignore.multicriteria.s2.ruleKey=cpp:S107
165 sonar.issue.ignore.multicriteria.s2.resourceKey=src/smpi/**/*.cpp
166
167 # MPI standard uses void*
168 sonar.issue.ignore.multicriteria.s3.ruleKey=cpp:S5008
169 sonar.issue.ignore.multicriteria.s3.resourceKey=src/smpi/**/*.cpp
170
171 # MPI standard uses const, sometimes const_cast is needed
172 sonar.issue.ignore.multicriteria.s4.ruleKey=cpp:S859
173 sonar.issue.ignore.multicriteria.s4.resourceKey=src/smpi/**/*.cpp
174
175 # Pointer and reference parameters should be "const" if the corresponding object is not modified
176 # AFAICT, the "constness" is required by the MPI standard and cannot be fixed.
177 sonar.issue.ignore.multicriteria.s5.ruleKey=cpp:S995
178 sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp
179
180 # Exclude some files from the analysis:
181 #  - our unit tests
182 #  - the tests that we borrowed elsewhere (MPICH and MBI)
183 #  - Flex-generated files
184 #  - Collectives that we borrowed elsewhere (mpich, openMPI and other implems)
185 #  - the NAS, that are included in our examples
186 #  - The Catch2 library, that is included in our unit tests
187 #  - The xxHash library, used by the MC
188 #  - MSG along with its examples and teshsuite
189 sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,**/*_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/**
190
191 # Exclude our examples from the duplication detection.
192 # Examples are expected to be somehow repetitive
193 sonar.cpd.exclusions=examples/**,teshsuite/**
194
195 # The build-wrapper output dir
196 sonar.cfamily.build-wrapper-output=bw-outputs
197
198 # Allow multithreaded execution
199 sonar.cfamily.threads=4
200
201 # Where the coverage files are located
202 # See https://docs.sonarqube.org/pages/viewpage.action?pageId=5312222
203 sonar.cfamily.gcov.reportsPath=Testing/CoverageInfo
204 # Files to ignore from coverage analysis:
205 #   - foreign test suites
206 #   - examples in smpi/mc (coverage doesn't work with model checker)
207 #   - XML files
208 #   - Python files used to generate either simcalls or deployment files
209 #   - Any java source code (it's deprecated now)
210 #   - MSG (deprecated too)
211 sonar.coverage.exclusions=teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,examples/smpi/mc/**,**/*.xml,**/generate.py,**/*.java,src/bindings/java/**,src/msg/**,include/msg/**,examples/deprecated/**,teshsuite/msg/**
212
213 # Encoding of the source files
214 sonar.sourceEncoding=UTF-8
215
216 # Version of the used prog languages
217 sonar.java.source=8
218 sonar.java.binaries=CMakeFiles/simgrid-java_jar.dir,examples/deprecated/java
219 sonar.java.libraries=
220 sonar.python.version=3
221
222 ### NOTE: the following properties are overridden by Jenkins configuration
223 ###
224 #sonar.java.binaries
225 #sonar.cfamily.build-wrapper-output
226 #sonar.cfamily.gcov.reportsPath
227 #sonar.python.coverage.reportPaths
228 #sonar.coverage.jacoco.xmlReportPaths
229 #sonar.cfamily.threads
230 #sonar.cfamily.cache.enabled
231 #sonar.cfamily.cache.path