-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathcustom-transformation-pre-qct.yaml
43 lines (41 loc) · 1.18 KB
/
custom-transformation-pre-qct.yaml
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
id: no-unused-vars
language: java
rule:
kind: local_variable_declaration
all:
- has:
has:
kind: identifier
pattern: $IDENT
- not:
precedes:
stopBy: end
has:
stopBy: end
any:
- { kind: identifier, pattern: $IDENT }
- { has: {kind: identifier, pattern: $IDENT, stopBy: end}}
fix: ''
--- # this is YAML doc separator to have multiple rules in one file
id: no-unused-imports
language: java
rule:
kind: import_declaration
all:
- not:
has:
kind: asterisk
- has:
has:
kind: identifier
pattern: $IDENT
- not:
precedes:
stopBy: end
has:
stopBy: end
any:
- { kind: identifier, pattern: $IDENT }
- { kind: type_identifier, pattern: $IDENT }
- { has: {kind: type_identifier, pattern: $IDENT, stopBy: end}}
fix: ''