Skip to content

Issue911 initialize inside using#925

Merged
manfred-brands merged 3 commits intomasterfrom
Issue911_InitializeInsideUsing
Oct 13, 2025
Merged

Issue911 initialize inside using#925
manfred-brands merged 3 commits intomasterfrom
Issue911_InitializeInsideUsing

Conversation

@manfred-brands
Copy link
Copy Markdown
Member

Fixes #911

NUnit1032 has the same issue. This PR also updates that one.

As both NUnit1032 and NUnit3002 look for SetUp methods, I extracted the code for detection additional methods.
At the same time, I augmented it to also allow specifying additional OneTimeSetUp methods

Affects #921 by changing specification of additional method and allowing onetime as well.

@manfred-brands manfred-brands force-pushed the Issue911_InitializeInsideUsing branch from 96a812a to 62ba6a4 Compare October 7, 2025 04:16
Copy link
Copy Markdown
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

Only a comment - but overall it looks good 👍 - I'm happy to merge it when you are

Comment thread src/nunit.analyzers/Extensions/IMethodSymbolExtensions.cs
@manfred-brands manfred-brands merged commit d377023 into master Oct 13, 2025
6 checks passed
@manfred-brands manfred-brands deleted the Issue911_InitializeInsideUsing branch October 13, 2025 10:26
@mikkelbu mikkelbu added this to the Release 4.11 milestone Oct 15, 2025
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.

NUnit3002 doesn't recognize the using statement.

2 participants