Logo AND Algorithmique Numérique Distribuée

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