SA1015 and SA1018 conflict

May 22, 2012 at 6: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?

/Per

May 22, 2012 at 6:53 AM

I had a similar issue which I posted at http://stylecop.codeplex.com/discussions/355656

I suggest that you post a fuller code sample.

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