|
From: Juan M. S. D. <jua...@gm...> - 2017-07-14 18:47:17
|
Yes you can. You have a couple overrides to `addViolation` that allow passing arguments for message interpolation. https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/AbstractRule.java#L421-L435 On Fri, Jul 14, 2017 at 2:18 PM, Caleb Knox <cal...@en...> wrote: > Hey all, > > For PMD rule messages, can we somehow pass a parameter from a rule's Java > class into the XML file? > > For example: > > "You had " + count + " repeated increment statements. This is above the > threshold. Try instead: var += " + count + "." > > or something. > > Thanks much. > > -- > Caleb Knox > > Endeveran > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Pmd-devel mailing list > Pmd...@li... > https://lists.sourceforge.net/lists/listinfo/pmd-devel > > |