Based on http://checkstyle.sourceforge.net/config_regexp.html
I am trying to find hard coded occurance of same strings. Which are repeated.
It returns me all the lines that have hardcoded string but it does not seem to care about “minimum” property.
I just need one which occured more then once. Here is my custom check
< module name="RegexpSinglelineJava">
< property name="format" value=""*""/>
< property name="minimum" value="2"/>
< /module>
Thanks
The
minimumproperty is not a count of equal strings:You could use an expression like:
With
RegexpMultiline. Altho that may not be very efficient.Something like: