This project is read-only.

SA1015 and SA1018 conflict

May 22, 2012 at 7:40 AM

Given this:

KeyValuePair<CategoryKey, Color>? item

In 4.7.22 I can't make this StyleCop-clean.

As written, SA1015 complains that there is no space after the closing bracket.

Adding a space makes SA1018 complain that  a nullable type symbol should not be preceded by with space.

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

How should this be fixed? Should the SA1015 rule be modified to allow for a single "?" as well?


May 22, 2012 at 7:53 AM

I had a similar issue which I posted at

I suggest that you post a fuller code sample.

May 22, 2012 at 1:00 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.