It was a generic way to solve the debate.
With a new configurable "
regexp rule" (regular expression & message), we can solve the problem, sample with checkstyle
RegexpSingleline implementation and
CHECKSTYLE:OFF :
<module name="RegexpSingleline">
<property name="severity" value="..."/>
<property name="format" value="CHECKSTYLE:OFF(\s)*$"/>
<property name="message" value="It is mandatory to comment on why the following code is excluded from Checkstyle checks."/>
</module>
But
parameters are evil and checsktyle RegExp* will not be implemented in Squid (
Rejected Checkstyle rules) :-).
=> I will implement this rule for our context, it seems to be specific at our historic usage.
Best regards.