Logo AND Algorithmique Numérique Distribuée

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