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

SA1516 falsely triggers on top level statements #3713

Closed
DavidArno opened this issue Oct 18, 2023 · 2 comments
Closed

SA1516 falsely triggers on top level statements #3713

DavidArno opened this issue Oct 18, 2023 · 2 comments

Comments

@DavidArno
Copy link

A Program.cs file containing the following:

using System;

var x = 1;
var y = 1;
var z = 1;

Console.WriteLine((x, y, z));

Results in SA1516 being reported for the var y = 1; and var z = 1; lines.

@bjornhellander
Copy link
Contributor

I can not reproduce this. Looks like a duplicate of #3351.

You need to use a beta version if you are using a "late" c# version. This would for example probably happen if you use StyleCop 1.1.118, which is from 2019.

@sharwell
Copy link
Member

Duplicate of #3351

@sharwell sharwell marked this as a duplicate of #3351 Nov 10, 2023
@sharwell sharwell closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
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

3 participants