Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
...
[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/dashboard/?id=simgrid
3
4 sonar.organization=simgrid
5 sonar.projectKey=simgrid_simgrid
6 sonar.projectName=SimGrid
7 sonar.projectVersion=3.24.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,c4a,c4b,c5a,c5b,c6a,c6b,c7,c8,c9,c10,f1,p1,s1,s2,s3,s4
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=squid:ObjectFinalizeOverridenCheck
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=squid: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=squid: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=squid: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=squid: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
55 # Pointers should not be cast to integral types
56 # But we need that for jMSG, smpi and other places
57 sonar.issue.ignore.multicriteria.c1.ruleKey=cpp:S1767
58 sonar.issue.ignore.multicriteria.c1.resourceKey=**/*.cpp
59
60 # Preprocessor operators "#" and "##" should not be used
61 # This poses portability issues, but we test on a large panel of architectures on purpose
62 # Until after Augustin goes to rehab, we cannot remove them all
63 sonar.issue.ignore.multicriteria.c2a.ruleKey=c:PPStringifyAndPastingUsage
64 sonar.issue.ignore.multicriteria.c2a.resourceKey=**/*
65 sonar.issue.ignore.multicriteria.c2b.ruleKey=cpp:PPStringifyAndPastingUsage
66 sonar.issue.ignore.multicriteria.c2b.resourceKey=**/*
67
68 # Macro names should comply with a naming convention
69 # But the macros in this file are named after the MPI standard
70 sonar.issue.ignore.multicriteria.c3.ruleKey=c:PPMacroName
71 sonar.issue.ignore.multicriteria.c3.resourceKey=include/smpi/smpi_extended_traces.h
72
73 # Declarations should be placed in a namespace
74 # But examples are intended to remain small and simple
75 sonar.issue.ignore.multicriteria.c4a.ruleKey=cpp:GlobalNamespaceMembers 
76 sonar.issue.ignore.multicriteria.c4a.resourceKey=examples/**/*.cpp
77 sonar.issue.ignore.multicriteria.c4b.ruleKey=cpp:GlobalNamespaceMembers 
78 sonar.issue.ignore.multicriteria.c4b.resourceKey=examples/**/*.hpp
79
80 # Replace alternative operator "not" with "!"
81 # I like it better, so please leave me alone
82 sonar.issue.ignore.multicriteria.c5a.ruleKey=cpp:S3659
83 sonar.issue.ignore.multicriteria.c5a.resourceKey=**/*.cpp
84 sonar.issue.ignore.multicriteria.c5b.ruleKey=cpp:S3659
85 sonar.issue.ignore.multicriteria.c5b.resourceKey=**/*.hpp
86
87 # Dynamically allocated memory should be released
88 # We have better ways to detect memleaks in SimGrid
89 # This is not disabled in example/ because our code should be nice looking
90 sonar.issue.ignore.multicriteria.c6a.ruleKey=cpp:S3584
91 sonar.issue.ignore.multicriteria.c6a.resourceKey=src/**/*.cpp
92 sonar.issue.ignore.multicriteria.c6b.ruleKey=cpp:S3584
93 sonar.issue.ignore.multicriteria.c6b.resourceKey=teshsuite/**/*.cpp
94
95 # Macros should not be used to define constants
96 # *.h includes are meant to be usable in C
97 sonar.issue.ignore.multicriteria.c7.ruleKey=cpp:S5028
98 sonar.issue.ignore.multicriteria.c7.resourceKey=**/*.h
99
100 # Deprecated code should be removed
101 # We do have a process to remove deprecated code
102 sonar.issue.ignore.multicriteria.c8.ruleKey=cpp:S1133
103 sonar.issue.ignore.multicriteria.c8.resourceKey=**/*
104
105 # Lambda return types should be implicit
106 # I don't see the point in general, plus we mostly use them when forced, to disambiguate
107 sonar.issue.ignore.multicriteria.c9.ruleKey=cpp:S3574
108 sonar.issue.ignore.multicriteria.c9.resourceKey=**/*
109
110 # Standard outputs should not be used directly to log anything
111 # Irrelevant for parsing examples in teshsuite/simdag
112 sonar.issue.ignore.multicriteria.c10.ruleKey=cpp:S106
113 sonar.issue.ignore.multicriteria.c10.resourceKey=teshsuite/simdag/**/*.cpp
114
115 # "reinterpret_cast" should not be used
116 # But we need this to interface C and Fortran
117 sonar.issue.ignore.multicriteria.f1.ruleKey=cpp:S3630
118 sonar.issue.ignore.multicriteria.f1.resourceKey=src/smpi/bindings/smpi_f77*.cpp
119
120 # In Python, Using command line arguments is security-sensitive
121 # But we are cautionous with it
122 sonar.issue.ignore.multicriteria.p1.ruleKey=python:S4823
123 sonar.issue.ignore.multicriteria.p1.resourceKey=**/*.py
124
125 # In MPI, there are C function pointers
126 sonar.issue.ignore.multicriteria.s1.ruleKey=cpp:S5205
127 sonar.issue.ignore.multicriteria.s1.resourceKey=src/smpi/**/*.cpp
128
129 # MPI standard has long prototypes
130 sonar.issue.ignore.multicriteria.s2.ruleKey=cpp:S107
131 sonar.issue.ignore.multicriteria.s2.resourceKey=src/smpi/**/*.cpp
132
133 # MPI standard uses void*
134 sonar.issue.ignore.multicriteria.s3.ruleKey=cpp:S5008
135 sonar.issue.ignore.multicriteria.s3.resourceKey=src/smpi/**/*.cpp
136
137 # MPI standard uses const, sometimes const_cast is needed
138 sonar.issue.ignore.multicriteria.s4.ruleKey=cpp:S859
139 sonar.issue.ignore.multicriteria.s4.resourceKey=src/smpi/**/*.cpp
140
141 # Exclude some files from the analysis:
142 #  - our unit tests
143 #  - the tests that we borrowed elsewhere (MPICH and ISP)
144 #  - Flex-generated files
145 #  - Collectives that we borrowed elsewhere (mpich, openMPI and other implems)
146 #  - the NAS, that are included in our examples
147 #  - The Catch2 library, that is included in our unit tests
148 sonar.exclusions=src/include/catch.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
149
150 # Exclude our examples from the duplication detection.
151 # Examples are expected to be somehow repetitive
152 sonar.cpd.exclusions=examples/**,teshsuite/**
153
154 # The build-wrapper output dir
155 sonar.cfamily.build-wrapper-output=bw-outputs
156
157 # Allow multithreaded execution
158 sonar.cfamily.threads=4
159
160 # Where the coverage files are located
161 # See https://docs.sonarqube.org/pages/viewpage.action?pageId=5312222
162 sonar.cfamily.gcov.reportsPath=Testing/CoverageInfo
163 # Files to ignore from coverage analysis:
164 #   - foreign test suites
165 #   - XML files
166 #   - Python files used to generate either simcalls or deployment files
167 #   - Any java source code (it's deprecated now)
168 sonar.coverage.exclusions=teshsuite/smpi/isp/**,teshsuite/smpi/mpich3-test/**,**/*.xml,src/simix/simcalls.py,**/generate.py,**/*.java,src/bindings/java/**
169 # Encoding of the source files
170 sonar.sourceEncoding=UTF-8
171
172 # Version of the used prog languages
173 sonar.java.source=7
174 sonar.java.binaries=CMakeFiles/simgrid-java_jar.dir,examples/deprecated/java
175
176 # Don't talk to me: travis don't like your verbosity
177 # sonar.verbose=true
178
179 ### NOTE: the following properties are overridden by Jenkins configuration
180 ###
181 #sonar.java.binaries
182 #sonar.cfamily.build-wrapper-output
183 #sonar.cfamily.gcov.reportsPath
184 #sonar.python.coverage.reportPaths
185 #sonar.coverage.jacoco.xmlReportPaths
186 #sonar.cfamily.threads