0

The requirement is that all static and not final variables are marked with a corresponding trailing comment, that contains a certain text (e.g. "TEXT")

I used the already existing template in IDEA "static fields that are not final", which works fine and added a comment with a text constraint.

static $Type$ $Variable$ = $Init$; // $Comment$

As a constraint for $Comment$ I used a text constraint with the regex !(.*TEXT.*)

Unfortunately, is doesn't work. A line:

private static String ABC = "ABS" // TEXT 

is still marked.

What am I doing wrong?

0 Answers0