Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use StyleCop.Analyzers 1.1.0-beta006 #1304

Merged
merged 1 commit into from
Feb 5, 2018

Conversation

blairconrad
Copy link
Member

I wanted to use a ! with pattern matching as part of my work on #1297.
StyleCop.Analyzers couldn't handle it, thinking that

if (!(context.Node is InvocationExpressionSyntax call))

had too many parentheses. I noticed the bug was fixed in 1.1.0-beta006, so thought, "why not upgrade?".

@@ -13,5 +13,6 @@
<Rule Id="CA1824" Action="None" />
<Rule Id="CA2201" Action="None" />
<Rule Id="CA2210" Action="None" />
<Rule Id="SA0001" Action="None" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.1.0-beta006 doesn't like it when a project is set to not generate XML docs. We don't really need them for the Examples or Tests.

methodOrIndexerName = indexer.Name;
parameters = indexer.Parameters;
return true;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The analyzer noticed that a few files had inconsistent indentation.

@@ -11,6 +11,7 @@
<Rule Id="SA1124" Action="Warning" />
<Rule Id="SA1127" Action="None" />
<Rule Id="SA1128" Action="None" />
<Rule Id="SA1413" Action="None" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The analyzer prefers a trailing comma in multiline initializers. I do too, but there are many instances where we don't use one, and I wasn't sure of the prevailing sentiment. I'm happy to remove this and add the commas…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually don't add a trailing comma, but I don't care if there is. Suppressing the warning is fine, as far as I'm concerned.

@thomaslevesque
Copy link
Member

Thanks @blairconrad!

@thomaslevesque thomaslevesque merged commit 4761277 into FakeItEasy:develop Feb 5, 2018
@blairconrad blairconrad added this to the vNext milestone Feb 5, 2018
@blairconrad
Copy link
Member Author

Thanks, @thomaslevesque!

@blairconrad blairconrad deleted the stylecop branch February 6, 2018 02:33
@blairconrad
Copy link
Member Author

This change has been released as part of FakeItEasy 4.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants