forked from typedb/typedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmd-rules.xml
57 lines (46 loc) · 2.1 KB
/
pmd-rules.xml
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
<?xml version="1.0"?>
<!--
~ Grakn - A Distributed Semantic Database
~ Copyright (C) 2016-2018 Grakn Labs Limited
~
~ Grakn is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Grakn is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Grakn. If not, see <http://www.gnu.org/licenses/gpl.txt>.
-->
<ruleset name="grakn"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd
http://pmd.sourceforge.net/ruleset/2.0.0 ">
<description>Grakn PMD ruleset</description>
<!-- Avoid general bad practices, e.g. empty `while` statements -->
<rule ref="rulesets/java/basic.xml"/>
<!-- Avoid redundant imports -->
<rule ref="rulesets/java/imports.xml">
<!-- Ignore too many static imports rule
we avoid wildcard imports, so you can always tell where an import
comes from. This means its not an issue to have lots of static imports.
-->
<exclude name="TooManyStaticImports"/>
</rule>
<!-- Avoid entirely redundant things, such as unnecesary use of `this` -->
<rule ref="rulesets/java/unnecessary.xml">
<!-- Ignore unnecessary parentheses rule
Often redundant parentheses can make code easier to understand.
-->
<exclude name="UselessParentheses"/>
</rule>
<!-- Avoid unused code, e.g. methods, classes -->
<rule ref="rulesets/java/unusedcode.xml"/>
<!-- Avoid unused parameters in most cases-->
<rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"/>
</ruleset>