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

xUnit1047 analyzer diagnostic incorrectly reported #2914

Closed
jasonwoods-7 opened this issue Apr 12, 2024 · 2 comments
Closed

xUnit1047 analyzer diagnostic incorrectly reported #2914

jasonwoods-7 opened this issue Apr 12, 2024 · 2 comments

Comments

@jasonwoods-7
Copy link

Description:

The following code produces an xUnit1047 analyzer diagnostic:

public class Foo {
	public Foo(params object[] args) { }
}

public class TestClass {
	public void TestMethod() {
		var foo = new Foo(new object());
	}
}

Expected behavior:

Since this isn't part of a TheoryDataRow, it seems this diagnostic shouldn't be reported.

Repo:

I've added a failing unit test here jasonwoods-7/xunit.analyzers@ada7c66

@bradwilson
Copy link
Member

Wow, that's a dumb bug on my part. 😭

@bradwilson
Copy link
Member

Available in 1.13.0-pre.2 https://xunit.net/docs/using-ci-builds

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

2 participants