Logo AND Algorithmique Numérique Distribuée

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