findepi commented on code in PR #10886:
URL: https://github.com/apache/iceberg/pull/10886#discussion_r1705567611
##########
.baseline/checkstyle/checkstyle.xml:
##########
@@ -414,6 +414,11 @@
<property name="format" value="@Test\(.*expected.*\)"/>
<property name="message" value="Prefer using
Assertions.assertThatThrownBy(...).isInstanceOf(...) instead."/>
</module>
+ <module name="RegexpSinglelineJava">
+ <property name="format" value="^\s*assert\s+"/>
Review Comment:
current pattern needs some improvement, since it also matches `fooassert`
(shouldn't) and doesn't match `assert(true);` (should).
instead of `\s*` / `\s+`, check it's a word boundary: `\b` (`\bassert\b`)
I thought there should be a dedicated way to do this, without having to use
regular expressions.
in fact, error-prone claims to do this:
https://errorprone.info/bugpattern/UseCorrectAssertInTests . why it didn't work
for us?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]