-
Notifications
You must be signed in to change notification settings - Fork 29
/
sonar-project.properties
123 lines (105 loc) · 5.72 KB
/
sonar-project.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
sonar.projectKey=philips-software_embeddedinfralib
sonar.organization=philips-software
sonar.projectName=embeddedinfralib
# x-release-please-start-version
sonar.projectVersion=7.0.0
# x-release-please-end
sonar.links.homepage=https://github.com/philips-software/amp-embedded-infra-lib
sonar.links.ci=https://github.com/philips-software/amp-embedded-infra-lib/actions
sonar.links.issue=https://github.com/philips-software/amp-embedded-infra-lib/issues
sonar.links.scm=https://github.com/philips-software/amp-embedded-infra-lib.git
sonar.sources=hal,infra,lwip/lwip_cpp,protobuf,services,upgrade
sonar.tests=hal,infra,protobuf,services,upgrade
sonar.test.inclusions=**/test/*,**/test_doubles/*
sonar.cfamily.compile-commands=compile_commands.json
sonar.cfamily.threads=2
sonar.externalIssuesReportPaths=mutation-sonar.json
sonar.testExecutionReportPaths=execution.xml
sonar.coverageReportPaths=coverage.xml
sonar.coverage.exclusions=**/Tracing*.?pp,**/Main.cpp,hal/generic/*,hal/unix/*,hal/windows/*,lwip/**/*,services/echo_console/*,**/*_instantiations/*
# Project specific ignored rules
sonar.issue.ignore.multicriteria=e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12
# Access specifiers should not be redundant [cpp:S3539]
#
# We allow duplicate access specifiers to distinguish
# between 'logical' blocks
# (i.e. separate private methods from private variables)
sonar.issue.ignore.multicriteria.e1.ruleKey=cpp:S3539
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*.?pp
# Methods should not be empty [cpp:S1186]
#
# We allow empty methods without a comment describing
# why they are empty. An often used paradigm in inheritance
# trees in our code. Considered a common convention.
sonar.issue.ignore.multicriteria.e2.ruleKey=cpp:S1186
sonar.issue.ignore.multicriteria.e2.resourceKey=**/*.?pp
# A call to "wait()" on a "std::condition_variable" should have a condition [cpp:S5404]
#
# wait() without conditions is actually not dangerous at all,
# especially when there is only one thread waiting on a condition.
sonar.issue.ignore.multicriteria.e3.ruleKey=cpp:S5404
sonar.issue.ignore.multicriteria.e3.resourceKey=**/*.?pp
# "std::move" and "std::forward" should not be confused [cpp:S5417]
#
# SonarQube incorrectly flags usages of std::forward in template code.
sonar.issue.ignore.multicriteria.e4.ruleKey=cpp:S5417
sonar.issue.ignore.multicriteria.e4.resourceKey=**/*.?pp
# Objects should not be sliced [cpp:S5912]
#
# Our WithStorage paradigm inevitably results in lots of objects being sliced
# in a non-dangerous way.
sonar.issue.ignore.multicriteria.e5.ruleKey=cpp:S5912
sonar.issue.ignore.multicriteria.e5.resourceKey=**/*.?pp
# Polymorphic base class destructor should be either public virtual or protected non-virtual [cpp:S1235]
#
# Destructors need only be virtual when 'delete' is applied to a base class of
# a most-derived object. Since we do not use the heap, and therefore do not use
# 'delete', there is no danger of having non-virtual destructors.
# Making destructors virtual increases the size of generated binaries considerably.
sonar.issue.ignore.multicriteria.e6.ruleKey=cpp:S1235
sonar.issue.ignore.multicriteria.e6.resourceKey=**/*.?pp
# "std::move" is never called on this rvalue reference argument. [cpp:S5500]
#
# When passing in objects with a SharedPtr, the recipient has two options:
# - Use the object immediately, and let the SharedPtr expire, or explicitly reset it
# - Store the SharedPtr for later usage
# Often times, the object is used immediately, and therefore std::move will
# not be called on the SharedPtr. This is a valid usage.
sonar.issue.ignore.multicriteria.e7.ruleKey=cpp:S5500
sonar.issue.ignore.multicriteria.e7.resourceKey=**/*.?pp
# Replace this "std::function" with a template parameter. [cpp:S5213]
#
# This rule has got it completely backwards. Templates can be great when
# different types need to be operated on in a similar way, but at the cost
# of compile time and size. std::function already solved that problem, so
# that function object parameters do not need to be template parameters.
sonar.issue.ignore.multicriteria.e8.ruleKey=cpp:S5213
sonar.issue.ignore.multicriteria.e8.resourceKey=**/*.?pp
# Explicitly capture the required scope variables. [cpp:S3608]
#
# This rule is not relevant for our embedded work. Either we are using
# infra::Function where available size is already limited, or we are
# compiling for a host configuration where size is not important.
sonar.issue.ignore.multicriteria.e9.ruleKey=cpp:S3608
sonar.issue.ignore.multicriteria.e9.resourceKey=**/*.?pp
# Variables should not be shadowed [cpp:S1117]
#
# We allow shadowing of variables in case they need to be stored for later use.
sonar.issue.ignore.multicriteria.e10.ruleKey=cpp:S1117
sonar.issue.ignore.multicriteria.e10.resourceKey=**/*.?pp
# The "Rule-of-Zero" should be followed [cpp:S4963]
#
# S4963 enforces absolutely, always the rule of zero.
# Rule of zero on certain occasions, i.e. classes that needs to do resource management,
# should be relaxed and rule of five should be followed.
# S3624 does exactly this: When the "Rule-of-Zero" is not applicable, the "Rule-of-Five" should be followed
# See https://community.sonarsource.com/t/how-to-fix-a-the-rule-of-zero-should-be-followed/20656/6
sonar.issue.ignore.multicriteria.e11.ruleKey=cpp:S4963
sonar.issue.ignore.multicriteria.e11.resourceKey=**/*.?pp
# "if","switch", and range-based for loop initializer should be used to reduce scope of variables [cpp:S6004]
#
# Although C++17 introduced a construct to initialize variables inside of an "if" or "switch" statement,
# and although the resulting reduction of scope is sometimes beneficial, due to the reduced readability
# this construct should not be used by default
sonar.issue.ignore.multicriteria.e12.ruleKey=cpp:S6004
sonar.issue.ignore.multicriteria.e12.resourceKey=**/*.?pp