Issue #7523: CLI '-s' option does not match by data from '-t'#18724
Conversation
|
@ayushactiveat , please show by CLI with a fix that whta is described in issue #7523 becomes fixed. can we make junit on this? print ast, fetch line that has token and line:column, and do CLI run on such line:column and make sure that retuned Xpath is ending with token. |
71847eb to
f15b8ec
Compare
| final String treeOutput = systemOut.getCapturedData(); | ||
|
|
||
| final java.util.regex.Pattern pattern = | ||
| java.util.regex.Pattern.compile("CLASS_DEF -> CLASS_DEF \\[(\\d+:\\d+)\\]"); |
There was a problem hiding this comment.
is it possilble to make regexpt to apply for each line where we have -> in output and make sure that search by line:col generates xpath that has token that is after ->
f15b8ec to
db83c51
Compare
|
@romani, here is the CLI verification - here -s successfully accepted the coordinate 1:38 provided by -t and generated the correct xpath, before this fix, -t would have output 1:37 (0-based), which -s would reject. I have updated please let me know if you need any changes |
|
@ayushactiveat , please make CI green to let me merge. thanksa lot for update. |
db83c51 to
4383594
Compare
run on local |
4383594 to
2d2c11d
Compare
Closes #7523
Changes:
AstTreeStringPrinterandDetailNodeTreeStringPrinterto print column numbers using 1-based indexing instead of 0-based.-tCLI option with the input requirements of the-soption and standard IDE coordinates.Verification:
java -jar checkstyle.jar -t File.javaproduces coordinates that are directly accepted byjava -jar checkstyle.jar -s line:col File.java.