-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
DescendantTokenCheck.xml
61 lines (61 loc) · 3.01 KB
/
DescendantTokenCheck.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
58
59
60
61
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle-metadata>
<module>
<check fully-qualified-name="com.puppycrawl.tools.checkstyle.checks.DescendantTokenCheck"
name="DescendantToken"
parent="com.puppycrawl.tools.checkstyle.TreeWalker">
<description><p>
Checks for restricted tokens beneath other tokens.
</p>
<p>
WARNING: This is a very powerful and flexible check, but, at the same time,
it is low-level and very implementation-dependent because its results depend
on the grammar we use to build abstract syntax trees. Thus, we recommend using
other checks when they provide the desired functionality. Essentially, this
check just works on the level of an abstract syntax tree and knows nothing
about language structures.
</p></description>
<properties>
<property default-value=""
name="limitedTokens"
type="java.lang.String[]"
validation-type="tokenTypesSet">
<description>Specify set of tokens with limited occurrences as descendants.</description>
</property>
<property default-value="2147483647" name="maximumDepth" type="int">
<description>Specify the maximum depth for descendant counts.</description>
</property>
<property name="maximumMessage" type="java.lang.String">
<description>Define the violation message
when the maximum count is exceeded.</description>
</property>
<property default-value="2147483647" name="maximumNumber" type="int">
<description>Specify a maximum count for descendants.</description>
</property>
<property default-value="0" name="minimumDepth" type="int">
<description>Specify the minimum depth for descendant counts.</description>
</property>
<property name="minimumMessage" type="java.lang.String">
<description>Define the violation message
when the minimum count is not reached.</description>
</property>
<property default-value="0" name="minimumNumber" type="int">
<description>Specify a minimum count for descendants.</description>
</property>
<property default-value="false" name="sumTokenCounts" type="boolean">
<description>Control whether the number of tokens found
should be calculated from the sum of the individual token counts.</description>
</property>
<property default-value="" name="tokens" type="anyTokenTypesSet">
<description>tokens to check</description>
</property>
</properties>
<message-keys>
<message-key key="descendant.token.max"/>
<message-key key="descendant.token.min"/>
<message-key key="descendant.token.sum.max"/>
<message-key key="descendant.token.sum.min"/>
</message-keys>
</check>
</module>
</checkstyle-metadata>