java - WhitespaceAfter conflict with GenericWhitespace -
i using both of above checks. there way make whitespaceafter forces space after commas, except when in generics? ie want valid.
public void function(string a, string b) { map<string,string> data = hashtable<string,string>(); // etc... } ie space after comma in functions declaration sensible, putting inside generics seems strange. in case of example, adding space seems make harder read:
public void fn(connection c, map<string,object>>items) { }
unfortunately, seems not possible checkstyle achieve goal. whitespaceafter rule doesn't have options exclude commas within type parameters. perhaps can write own rule extending or rewriting whitespaceafter rule, refering http://checkstyle.sourceforge.net/writingchecks.html
Comments
Post a Comment