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

SA0102 : False Positive (CSharp.CsParser : A syntax error has been discovered) #51

Open
Roman-Didenko opened this issue Jan 9, 2016 · 4 comments
Assignees

Comments

@Roman-Didenko
Copy link

The following code:

Func<object> x = () => null;
decimal t = x() as decimal? ?? 0;

incorrectly gives:
SA0102 : CSharp.CsParser : A syntax error has been discovered in file ....

Build 4.7.58.3

@carl-berg
Copy link

I have also discovered a false positive for this rule. This one regarding C#6 strings:

var from = "2015-01-01";
var to = "2016-01-01";
var token = $"{{ \"From\": \"{from}\", \"To\": \"{to}\" }}";

@pbalachandar
Copy link

I get SA0102 : CSharp.CsParser : A syntax error has been discovered in file... for the below line

public static MySingletonInstance Instance => LazyInstance.Value;

How can I fix this?

@onegronm
Copy link

onegronm commented Apr 3, 2016

I have the same false positive with this line of code:

dataEntryOutlineDiv.Attributes["class"] = "divHeightButton";

@rsheptolut
Copy link

The false positive is not as big a problem as it is the fact that I get no style checking for the file at all. So it is in fact a failure of StyleCop

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

No branches or pull requests

6 participants