RegexpSingleline/RegexpSinglelineJava - No column in error message #12818
-
I'm started using RegexpSinglelineJava to catch invalid log messages*, but violations of this check report only a line number, not a column number. I could hoping that capture groups would have some relation with column numbers, but that doesn't seem to be the case.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
We match line by line, we never thought about matching and printing columns of all matching positions of groups. If you see how can we improve logging of violation , please let us know. |
Beta Was this translation helpful? Give feedback.
-
@VirtualTim please share your regular expression, we might be able to steer you towards another check that could help. |
Beta Was this translation helpful? Give feedback.
We match line by line, we never thought about matching and printing columns of all matching positions of groups. If you see how can we improve logging of violation , please let us know.
If Java implmnetation of regexp able to get columns for groups, we just need to figureout how to make fancy formatting of message to print columns is user required. Can you write some simple java code that does this, we print messages by
String.format
.We need some flexible parameters.... uh ...... It might be better to write custom applicaiton to do this as you need after checkstyle validation, based on checkstyle report.