SA1015 with nested generics

May 30, 2012 at 6:08 PM

SA1015 states: "A closing generic bracket should be followed by an open paranthesis, a close parenthesis, a closing generic bracket, an end of line or a single whitespace (but not whitespace and an open paranthesis)."

However, the following seems to fail in my project:

Func<string, IList<string>> myCallbackFunction;

In this case, how can we format the declaration to pass SA1015?

May 31, 2012 at 8:42 AM

That line is fine. The first closing generic bracket is followed by a closing generic bracket - so all good.

The second closing generic bracket is followed by a single whitespace - so all good.

May 31, 2012 at 1:08 PM

Right, it should be fine, but the aforementioned code fails to pass SA1015 in my project, using 4.7.27.

May 31, 2012 at 1:13 PM
Pasted into latest here and no issue. Can you open a bug and attach a
zip of a cs file please?

May 31, 2012 at 1:22 PM

As with my other issue I was having, deleting the StyleCop.cache files from the project and rescanning resolved the issue. Thanks for taking the time to look into it.