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

C#7 throw expressions result in SA0102 #92

Closed
PeteCooney opened this issue Mar 13, 2017 · 1 comment
Closed

C#7 throw expressions result in SA0102 #92

PeteCooney opened this issue Mar 13, 2017 · 1 comment

Comments

@PeteCooney
Copy link

PeteCooney commented Mar 13, 2017

When using the new C#7 throw expressions StyleCop returns a false-positive instance of SA0102 (syntax error) and stops processing the rest of the file.

For example:

this.LocalProperty = parameterValue ?? throw new ArgumentNullException(nameof(parameterValue), $"A value must be provided for {nameof(parameterValue)}");

Verified on Visual Studio 2017 Enterprise using StyleCop 5.0.6187.1

@msmolka
Copy link

msmolka commented Mar 17, 2017

Also inline is assigning the same.
How to disable this rule?

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

No branches or pull requests

2 participants