https://checkstyle.org/cmdline.html#Command_line_usage
$ cat Test.java
public class Test {
public Test() {}
}
$ java -jar /var/tmp/checkstyle-8.29-all.jar -t Test.java
CLASS_DEF -> CLASS_DEF [1:0]
|--MODIFIERS -> MODIFIERS [1:0]
| `--LITERAL_PUBLIC -> public [1:0]
|--LITERAL_CLASS -> class [1:7]
|--IDENT -> Test [1:13]
`--OBJBLOCK -> OBJBLOCK [1:18]
|--LCURLY -> { [1:18]
|--CTOR_DEF -> CTOR_DEF [2:2]
| |--MODIFIERS -> MODIFIERS [2:2]
| | `--LITERAL_PUBLIC -> public [2:2]
| |--IDENT -> Test [2:9]
| |--LPAREN -> ( [2:13]
| |--PARAMETERS -> PARAMETERS [2:14]
| |--RPAREN -> ) [2:14]
| `--SLIST -> { [2:16]
| `--RCURLY -> } [2:17]
`--RCURLY -> } [3:0]
$ java -jar /var/tmp/checkstyle-8.29-all.jar -s 2:17 Test.java
/CLASS_DEF[./IDENT[@text='Test']]/OBJBLOCK/CTOR_DEF[./IDENT[@text='Test']]/SLIST
$ java -jar /var/tmp/checkstyle-8.29-all.jar -s 2:16 Test.java
$
by first command, xpath is printed for parent token SLIST, but expected RCURLY.
by second command, nothing is printed but expected xpath for SLIST.
https://checkstyle.org/cmdline.html#Command_line_usage
by first command, xpath is printed for parent token
SLIST, but expectedRCURLY.by second command, nothing is printed but expected xpath for
SLIST.