Bump NUnit.Analyzers from 3.9.0 to 4.11.2 #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated NUnit.Analyzers from 3.9.0 to 4.11.2.
Release notes
Sourced from NUnit.Analyzers's releases.
4.11.2
NUnit Analyzers 4.11.2 - November 2, 2025
This release of the NUnit Analyzers fixes a problem in the
NUnit2057analyzer for unnecessary use of lambdaexpressions. The release also extends
NUnit2021so that it can determining ifIs.NaNorIs.Not.NaNconstraintsare used on incompatible types.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
4.11.1
NUnit Analyzers 4.11.1 - October 30, 2025
This release of the NUnit Analyzers fixes a regression related to the analysis of nullable enum parameters in
NUnit1001andNUnit1031. The release also contains a new analyzer and codefix for unnecessary usage of lambdaexpressions in asserts.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
4.11.0
NUnit Analyzers 4.11 - October 28, 2025
This release of the NUnit Analyzers includes improvements and fixes related to
IDisposablehandling and initializationin
SetUpandOneTimeSetUpmethods. It also introduces the ability to configure additional methods that should betreated as
SetUpandTearDownmethods by the analyzers. This can be done in the.editorconfig, and there are fourconfigurations for this:
dotnet_diagnostic.NUnit.additional_setup_methodsdotnet_diagnostic.NUnit.additional_teardown_methodsdotnet_diagnostic.NUnit.additional_one_time_setup_methodsdotnet_diagnostic.NUnit.additional_one_time_teardown_methodsEach configuration accepts a list of method names, separated by commas, semicolons, or spaces. For example:
dotnet_diagnostic.NUnit.additional_setup_methods = CustomSetup, MyInitAs in recent releases, a major part of this work was contributed by @manfred-brands.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.10.0
NUnit Analyzers 4.10 - August 9, 2025
This release of the NUnit Analyzers contains some minor improvements to NUnit2050, NUnit2056, and NUnit2007 as well
as some improvements to existing tests. Once again, @manfred-brands was responsible for the majority of the work.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Bugs
Tooling, Process, and Documentation
4.9.2
NUnit Analyzers 4.9.2 - June 17, 2025
This release of the NUnit Analyzers extends the
NUnit3001nullability suppressorto also work in the context of
Assert.EnterMultipleScopeand other using statements.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
4.9.1
NUnit Analyzers 4.9.1 - June 12, 2025
This release of the NUnit Analyzers fixes a problem with the code-fix for translating
Assert.Multiple/Assert.MultipleAsyncinto the newAssert.EnterMultipleScopeformatwhen the test method already is asynchronous and have a return type different from
Task.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Bugs
4.9.0
NUnit Analyzers 4.9 - June 11, 2025
This release of the NUnit Analyzers adds several new analyzers. For the
RangeAttribute,the analyzers now warn about potential issues at runtime.
It also introduces an analyzer and code fix for translating
Assert.Multiple/Assert.MultipleAsyncinto the newAssert.EnterMultipleScopeformat, as wellas for converting
is Tchecks intoIs.InstanceOf<T>()constraints.For
NUnit2021, the analyzer now respectsUsingPropertiesComparer, including enhancementsthat will be available in NUnit 4.4.
Finally, this release includes improvements to
NUnit2007,NUnit2045, andNUnit4002.See the list of resolved issues below for more details.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
NUnit4002shouldn't trigger forTvsnullable<T>struct typesTooling, Process, and Documentation
4.8.1
NUnit Analyzers 4.8.1 - May 29, 2025
This release of the NUnit Analyzers fixes a problem with
NUnit4002when applied to comparisons between non-numbertypes - e.g. strings.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Bugs
4.8.0
NUnit Analyzers 4.8 - May 22, 2025
This release of the NUnit Analyzers adds a new diagnostic
NUnit1034that checkswhether base TestFixtures are declared as
abstract. When a base class is notabstractit will also be run as a standalone test which is most times not the intention.
The release also contains some fixes to
NUnit4002andNunit2045.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.7.0
NUnit Analyzers 4.7 - April 1, 2025
The release primarily add another diagnostic
NUnit4002- and associated codefix - to help simplifyEqualToconstraints when the expected value is a simple constant - e.g.true,false,0, ordefault. The release also removes some false positives forNunit1029.As tooling contributions the analyzers now build using .NET8.0 and also analyzers and codefixes are
now split into separate projects as only editors should load codefixes.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.6.0
NUnit Analyzers 4.6 - January 9, 2025
This release contains two improvements: Allowing
NUnit1001to understandDateOnlyandTimeOnlyparameters inTestCaseUsageand makingNUnit2045supportAssert.EnterMultipleScope(introduced in NUnit version 4.2).The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Tooling, Process, and Documentation
4.5.0
NUnit Analyzers 4.5 - December 22, 2024
The release primarily fixes a problem with the NUnit Analyzers when used with NUnit 4.3.1 - see #811 for more
information. In additional, we have also added some smaller improvements and bug fixes.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.4.0
NUnit Analyzers 4.4 - November 13, 2024
This release of the NUnit Analyzers adds handling of
Assert.IsAssignableFrom/Assert.IsNotAssignableFromandAssert.Positive/Assert.Negative. Also insertion of trivia for code fixes forNUnit2007andNUnit2046have been improved.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.3.0
NUnit Analyzers 4.3 - August 9, 2024
This release of the NUnit Analyzers contains some bug fixes to existing analyzers and code fixes - among other
improvements to trivia when using the code fix of NUnit2049.
For new features we now warn against using
TestContext.Writeas this will be obsolete in NUnit at some point;NUnit1001 now recognises and check generic TestCase attributes; and we have added a new analyzer and code fix for
simplifying usages of
ValuesAttribute.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.2.0
NUnit Analyzers 4.2 - April 24, 2024
This release of the Analyzers extends NUnit2050 to also cover
Assumeand Nunit1032 to consider dispose of a typehaving explicit interface implementation. Furthermore, named parameters are now handled correctly codefixes for
classical asserts, and NUnit2010 improves the logic for determining
Equalsmethods.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.1.0
NUnit Analyzers 4.1 - March 16, 2024
This release of the Analyzers extends the suppression of nullable warnings to also respect assumptions -
expressed via
Assume.That. Also nullable warnings are suppressed even in the context of thenull-forgiving operator
!, and NUnit2010 is extended to also coverispattern expressions - e.g.is nulland more general integer patterns asis < 0 or >= 1.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
4.0.1
NUnit Analyzers 4.0.1 - February 1, 2024
Small release that fixes a problem with the 4.0 release when combining
TestCaseSourceandCancelAfter.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Bugs
Tooling, Process, and Documentation
4.0
NUnit Analyzers 4.0 - January 27, 2024
Version 4 of the NUnit analyzers drops the support for older releases of Visual Studio. I.e.
releases of Visual Studio that are older than Visual Studio 2019 16.3. In addition, this release
contains various bug fixes to existing analyzers, support of the
CancelAfterAttributethat was introduced in NUnit 4, and extends the codefix for NUnit2007 to also work when
.Withinis used.The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
3.10.0
NUnit Analyzers 3.10 (and 2.10) - November 27, 2023
This release adds a couple of improvements to the analyzers:
These improvements extend the functionality in the beta that added support for NUnit 4 and
for migrating to NUnit 4. Especially, the handling of the movement of classic asserts into a new namespace
NUnit.Framework.Legacy and of the improved assert result messages - for more information see
https://docs.nunit.org/articles/nunit/Towards-NUnit4.html. The analyzers can help updating the
classic assert and fix the assert messages.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Tooling, Process, and Documentation
3.10.0-beta1
NUnit Analyzers 3.10-beta1 (and 2.9-beta1) - November 17, 2023
This beta adds support for the upcoming NUnit 4 - see pull request #612 - which solves the following issues
The primary change is the handling of the movement of classic asserts into a new namespace
NUnit.Framework.Legacyand of the improved assert result messages - for more information seehttps://docs.nunit.org/articles/nunit/Towards-NUnit4.html. The analyzers can help updating the
classic assert and fix the assert messages.
The release contains contributions from the following users (in alphabetical order):
Issues Resolved
Features and Enhancements
Bugs
Tooling, Process, and Documentation
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)