Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 14, 2025

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 NUnit2057 analyzer for unnecessary use of lambda
expressions. The release also extends NUnit2021 so that it can determining if Is.NaN or Is.Not.NaN constraints
are used on incompatible types.

The release contains contributions from the following users (in alphabetical order):

  • @​MaceWindu
  • @​manfred-brands
  • @​stevenaw

Issues Resolved

Features and Enhancements

  • #​929 Alert when using Is.NaN or Is.Not.NaN on an incompatible type

Bugs

  • #​945 [NUnit2057] Reported for Throws assert

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
NUnit1001 and NUnit1031. The release also contains a new analyzer and codefix for unnecessary usage of lambda
expressions in asserts.

The release contains contributions from the following users (in alphabetical order):

  • @​MaceWindu
  • @​maksim-sovkov
  • @​manfred-brands

Issues Resolved

Features and Enhancements

  • #​927 Add new rule for unnecessary use of lambda expressions

Bugs

  • #​939 NUnit1001 - false positive for arguments with nullable enum parameters
  • #​938 [NUnit1031] False positive for nullable structs

4.11.0

NUnit Analyzers 4.11 - October 28, 2025

This release of the NUnit Analyzers includes improvements and fixes related to IDisposable handling and initialization
in SetUp and OneTimeSetUp methods. It also introduces the ability to configure additional methods that should be
treated as SetUp and TearDown methods by the analyzers. This can be done in the .editorconfig, and there are four
configurations for this:

  • dotnet_diagnostic.NUnit.additional_setup_methods
  • dotnet_diagnostic.NUnit.additional_teardown_methods
  • dotnet_diagnostic.NUnit.additional_one_time_setup_methods
  • dotnet_diagnostic.NUnit.additional_one_time_teardown_methods

Each configuration accepts a list of method names, separated by commas, semicolons, or spaces. For example:

dotnet_diagnostic.NUnit.additional_setup_methods = CustomSetup, MyInit

As 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):

  • @​AlisonAMorrison
  • @​BodrickLight
  • @​cbersch
  • @​manfred-brands
  • @​mikkelbu
  • @​PiotrKlecha
  • @​sbe-schleupen

Issues Resolved

Features and Enhancements

  • #​921 NUnit1032 - disposals in overridden methods not detected
  • #​919 NUnit1032/NUnit3002 - local functions not analyzed
  • #​918 NUnit2045 - false positive for inline usings
  • #​911 NUnit3002 doesn't recognize the using statement.
  • #​910 using declarations not recognized by NUnit2045

Bugs

  • #​922 NUnit1001 - false positive for arguments with generic parameters
  • #​914 Wrong position of NUnit1001 diagnostic for TestCase with four parameters or more

Tooling, Process, and Documentation

  • #​926 chore: Bump NUnit3TestAdapter
  • #​908 chore: bump version
  • #​885 Bump to NUnit version 4.4 when this is released

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):

  • @​dfev77
  • @​manfred-brands
  • @​mikebro
  • @​mikkelbu

Issues Resolved

Bugs

  • #​901 False positive on NUnit2050
  • #​899 NUnit2056 analyzer's code fix removes comments and empty lines above it.
  • #​896 NUnit2007 shouldn't trigger for generic types e.g. typeof(T)

Tooling, Process, and Documentation

  • #​905 NUnit4.4 alpha -> beta changes
  • #​897 chore: Correct typo in NUnit2045.md
  • #​894 Improve tests by adding ↓ to tests were it is missing in the source
  • #​887 chore: bump version

4.9.2

NUnit Analyzers 4.9.2 - June 17, 2025

This release of the NUnit Analyzers extends the NUnit3001 nullability suppressor
to also work in the context of Assert.EnterMultipleScope and other using statements.

The release contains contributions from the following users (in alphabetical order):

  • @​artificialWave
  • @​manfred-brands
  • @​mikkelbu

Issues Resolved

Features and Enhancements

  • #​892 Assert.EnterMultipleScope not detecting nullability properly

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.MultipleAsync into the new Assert.EnterMultipleScope format
when 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):

  • @​MaceWindu
  • @​manfred-brands
  • @​mikkelbu

Issues Resolved

Bugs

  • #​888 Assert.MultipleAsync -> EnterMultipleScope autofix produce invalid code

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.MultipleAsync into the new Assert.EnterMultipleScope format, as well
as for converting is T checks into Is.InstanceOf<T>() constraints.

For NUnit2021, the analyzer now respects UsingPropertiesComparer, including enhancements
that will be available in NUnit 4.4.

Finally, this release includes improvements to NUnit2007, NUnit2045, and NUnit4002.
See the list of resolved issues below for more details.

The release contains contributions from the following users (in alphabetical order):

  • @​MaceWindu
  • @​manfred-brands
  • @​mikkelbu
  • @​OsirisTerje
  • @​stevenaw

Issues Resolved

Features and Enhancements

  • #​880 NUnit2007 could flag typeof() as a constant first parameter
  • #​866 When Assert.Multiple is found, should suggest to convert to Assert.EnterMultipleScope
  • #​865 NUnit 2045 suggest Assert.Multiple, but should suggest Assert.EnterMultipleScope
  • #​857 NUnit2021 Should not raise for UsingPropertiesComparer
  • #​765 Add Rule for converting is T into Is.InstanceOf()
  • #​89 Test the correct usage of the Range attribute

Bugs

  • #​879 NUnit4002 shouldn't trigger for T vs nullable<T> struct types

Tooling, Process, and Documentation

  • #​868 chore: bump version

4.8.1

NUnit Analyzers 4.8.1 - May 29, 2025

This release of the NUnit Analyzers fixes a problem with NUnit4002 when applied to comparisons between non-number
types - e.g. strings.

The release contains contributions from the following users (in alphabetical order):

  • @​adrianbanks
  • @​manfred-brands
  • @​mikkelbu

Issues Resolved

Bugs

  • #​870 Compilation error caused by exception in an analyzer after updating to v4.8.0

4.8.0

NUnit Analyzers 4.8 - May 22, 2025

This release of the NUnit Analyzers adds a new diagnostic NUnit1034 that checks
whether base TestFixtures are declared as abstract. When a base class is not abstract
it will also be run as a standalone test which is most times not the intention.

The release also contains some fixes to NUnit4002 and Nunit2045.

The release contains contributions from the following users (in alphabetical order):

  • @​Bartleby2718
  • @​CharliePoole
  • @​MaceWindu
  • @​manfred-brands
  • @​mikkelbu
  • @​Rabadash8820

Issues Resolved

Features and Enhancements

  • #​840 Detect incorrect or questionable use of TestFixture inheritance.

Bugs

  • #​862 NUnit.Analyzers doesn't recognize the version of NUnit in use
  • #​856 NUnit4002 shouldn't trigger for unknown types

Tooling, Process, and Documentation

  • #​861 Add missing backticks in NUnit4002.md
  • #​855 chore: bump version

4.7.0

NUnit Analyzers 4.7 - April 1, 2025

The release primarily add another diagnostic NUnit4002 - and associated codefix - to help simplify
EqualTo constraints when the expected value is a simple constant - e.g. true, false, 0, or
default. The release also removes some false positives for Nunit1029.

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):

  • @​cbersch
  • @​Dreamescaper
  • @​manfred-brands
  • @​mikkelbu
  • @​seanblue
  • @​zlepper

Issues Resolved

Features and Enhancements

  • #​828 Replace Is.EqualTo(default) with Is.Default
  • #​826 Suggest to use Is.Null instead of Is.EqualTo(null)
  • #​824 Use Is.False / Is.True instead of Is.EqualTo

Bugs

  • #​832 False positive for Nunit1029 when only a type argument is use

Tooling, Process, and Documentation

  • #​853 chore: Add NUnit4002.md solution file
  • #​846 chore: Bump NUnit3TestAdapter to version 5
  • #​843 chore(deps): Bump Microsoft.NET.Test.Sdk and Microsoft.NETFramework.ReferenceAssemblies
  • #​838 chore: bump version
  • #​677 Build using .NET8.0 SDK

4.6.0

NUnit Analyzers 4.6 - January 9, 2025

This release contains two improvements: Allowing NUnit1001 to understand DateOnly and TimeOnly parameters in
TestCaseUsage and making NUnit2045 support Assert.EnterMultipleScope (introduced in NUnit version 4.2).

The release contains contributions from the following users (in alphabetical order):

  • @​Dreamescaper
  • @​manfred-brands
  • @​mikkelbu

Issues Resolved

Features and Enhancements

  • #​820 NUnit1001 compains about DateOnly parameters
  • #​769 Recognized the new Assert.EnterMultipleScope() concept.

Tooling, Process, and Documentation

  • #​829 chore: Bump year to 2025 in copyrights
  • #​823 chore: Bump cake.tool to version 4
  • #​822 chore: Bump NUnit to 4.3.2
  • #​818 chore: Replace "buildstats.info" with "img.shields.io"
  • #​815 chore: bump version

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):

  • @​manfred-brands
  • @​mikkelbu
  • @​RenderMichael
  • @​zlepper

Issues Resolved

Features and Enhancements

  • #​811 NUnit2021 ignores cast operation since NUnit 4.3.1
  • #​801 Allow NUnit2005 to recognize Is.Empty

Bugs

  • #​794 AD0001: Occasional InvalidOperationException error in analyzer in IDE

Tooling, Process, and Documentation

  • #​808 chore: Correct typo
  • #​806 Add information about dotnet_diagnostic.NUnit1032.additional_dispose_methods to the docs
  • #​795 chore(deps): Bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0
  • #​793 chore: bump version

4.4.0

NUnit Analyzers 4.4 - November 13, 2024

This release of the NUnit Analyzers adds handling of Assert.IsAssignableFrom/Assert.IsNotAssignableFrom and
Assert.Positive/Assert.Negative. Also insertion of trivia for code fixes for NUnit2007 and NUnit2046
have been improved.

The release contains contributions from the following users (in alphabetical order):

  • @​manfred-brands
  • @​MCPtz
  • @​mikkelbu
  • @​verdie-g

Issues Resolved

Features and Enhancements

  • #​790 NUnit.Analyzers 4.3.0 missed an Assert.IsAssignableFrom that caused a build error after upgrading to latest NUnit 4.2.2
  • #​789 NUnit.Analyzers 4.3.0 missed an Assert.Positive that caused a build error after upgrading to latest NUnit 4.2.2

Bugs

  • #​784 Fix trivia for NUnit2046
  • #​783 NUnit2007 doesn't apply trivia correctly

Tooling, Process, and Documentation

  • #​788 chore: Bump NUnit to version 4.2.2
  • #​785 chore(deps): Bump NUnit3TestAdapter from 4.5.0 to 4.6.0
  • #​780 chore(deps): Bump CSharpIsNullAnalyzer from 0.1.495 to 0.1.593
  • #​778 chore(deps): Bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.1
  • #​776 chore: bump version
  • #​775 chore: Update release notes

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.Write as 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):

  • @​andrewimcclement
  • @​Bartleby2718
  • @​DrPepperBianco
  • @​KaiBNET
  • @​maettu-this
  • @​manfred-brands
  • @​mikkelbu
  • @​RenderMichael
  • @​SeanKilleen
  • @​trampster

Issues Resolved

Features and Enhancements

  • #​770 Add rule to detect calls to TestContext.Write methods and CodeFix to replace usages with Out.Write
  • #​767 Augment NUnit1001 to recognized and check generic TestCase attributes
  • #​755 New diagnostic: The Values attribute can be simplified.

Bugs

  • #​766 Error when TearDown method is defined in partial test classes - Syntax node is not within syntax tree
  • #​743 NUnit1032 (missing Dispose), if dispose is wrapped in "(… as IDisposable)?.Dispose()"
  • #​739 Null suppression does not work when Assert is fully qualified
  • #​713 Code fix for NUnit2049 places the comma at a wrong place and messes up indentation bug

Tooling, Process, and Documentation

  • #​764 Update the solution file
  • #​761 Update nunit.analyzers.nuspec to specify that NUnit.Analyzers v4 is intended to be used with NUnit 4.
  • #​756 error NUnit1032 is incorrect when InstancePerTestCase and constructor is used to initialize IDisposible
  • #​741 chore(deps): Bump Microsoft.NET.Test.Sdk from 17.9.0 to 17.10.0 in /src
  • #​737 Update NUnit2013.md to fix code block
  • #​736 chore: bump version
  • #​734 Why dropping composite message formatting support also for Assert.Pass/Fail/... where there are no actual and constraint parameters?

4.2.0

NUnit Analyzers 4.2 - April 24, 2024

This release of the Analyzers extends NUnit2050 to also cover Assume and Nunit1032 to consider dispose of a type
having explicit interface implementation. Furthermore, named parameters are now handled correctly codefixes for
classical asserts, and NUnit2010 improves the logic for determining Equals methods.

The release contains contributions from the following users (in alphabetical order):

  • @​Bartleby2718
  • @​hazzik
  • @​maettu-this
  • @​manfred-brands
  • @​matode
  • @​mikkelbu

Issues Resolved

Features and Enhancements

  • #​731 Add test for wrapping conditional expression in parenthesis for NUnit2050
  • #​720 Replace UpdateStringFormatToFormattableString with String.Format
  • #​719 NUnit2050 should cover Assume
  • #​710 Nunit1032 - consider dispose of a type having explicit interface implementation

Bugs

  • #​728 NUnit2010 - do not consider Equals call if it doesn't override Object.Equals
  • #​712 [bug] Code fix for NUnit2005 does not correctly fix Assert.AreEqual if named parameters are used in unexpected order

Tooling, Process, and Documentation

  • #​733 Missing full stops added to NUnit2050
  • #​722 Use Markdown for CHANGES
  • #​708 chore: bump-version

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 the
null-forgiving operator !, and NUnit2010 is extended to also cover is pattern expressions - e.g.
is null and more general integer patterns as is < 0 or >= 1.

The release contains contributions from the following users (in alphabetical order):

  • @​lahma
  • @​manfred-brands
  • @​mikkelbu
  • @​RenderMichael
  • @​TheBigNeo
  • @​verdie-g

Issues Resolved

Features and Enhancements

  • #​693 Possibly Null Reference Warning should be suppressed for Assume
  • #​691 Extent rule NUnit2010 to detect 'is null'
  • #​679 Null suppression doesn't work when the body has a null suppression

Bugs

  • #​700 CodeFix for Assert with null message causes ambiguous code.
  • #​689 Incorrect constraint model transformation for named parameters

Tooling, Process, and Documentation

  • #​697 chore: Bump NUnit to version 4.1.0
  • #​694 Switch to using license expression
  • #​690 chore(deps): Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0
  • #​687 chore: Update release notes

4.0.1

NUnit Analyzers 4.0.1 - February 1, 2024

Small release that fixes a problem with the 4.0 release when combining TestCaseSource and CancelAfter.

The release contains contributions from the following users (in alphabetical order):

  • @​manfred-brands
  • @​mikkelbu
  • @​richardissimo

Issues Resolved

Bugs

  • #​685 error NUnit1029: The TestCaseSource provides '1' parameter(s), but the Test method expects '1' parameter(s)

Tooling, Process, and Documentation

  • #​684 chore: bump-version

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 CancelAfterAttribute
that was introduced in NUnit 4, and extends the codefix for NUnit2007 to also work when
.Within is used.

The release contains contributions from the following users (in alphabetical order):

  • @​Abrynos
  • @​gfoidl
  • @​Laniusexcubitor
  • @​MaceWindu
  • @​manfred-brands
  • @​mikkelbu
  • @​RenderMichael
  • @​SeanKilleen

Issues Resolved

Features and Enhancements

  • #​669 NUnit2007 does not provide codefix when .Within is used
  • #​609 Drop support for VS before 2019

Bugs

  • #​663 NUnit1027 fired when CancellationToken and [CancelAfter] is given
  • #​659 NUnit1032 throws an exception in a specific configuration
  • #​656 NUnit1028 warns about overridden methods
  • #​635 ArgumentException in DisposeFieldsAndPropertiesInTearDownAnalyzer

Tooling, Process, and Documentation

  • #​676 chore: markdownlint-cli2-config is removed use flag instead
  • #​668 chore(deps): Bump StyleCop.Analyzers.Unstable from 1.2.0.507 to 1.2.0.556
  • #​662 chore: Bump NUnit 4 to version 4.0.1
  • #​660 chore: Bump to NUnit 4
  • #​654 chore: Bump version
  • #​630 Update NUnit Analyzer docs to respect 120-character docs rule documentation
  • #​508 Restore "File version" and "Product version" in analyzer dlls

3.10.0

NUnit Analyzers 3.10 (and 2.10) - November 27, 2023

This release adds a couple of improvements to the analyzers:

  • Check that users don't accidentally specify CallerArgumentExpression parameters
  • Relax analyzers for added support for IAsyncEnumerable on *Source attributes

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):

  • @​manfred-brands
  • @​mikkelbu
  • @​stevenaw

Issues Resolved

Features and Enhancements

  • #​639 Rule to check users don't accidentally specify CallerArgumentExpression parameters
  • #​634 Relax analyzers for added support for IAsyncEnumerable on *Source attributes

Tooling, Process, and Documentation

  • #​648 chore: Skip branch builds on PRs
  • #​644 chore: Update release notes for 3.10 beta
  • #​429 Drop the VSIX project

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

  • #​620 Make Classic Conversion rule for CollectionAssert improvement
  • #​618 Make Classic Conversion rule for StringAssert
  • #​617 Update .Within makes no sense rule
  • #​610 Ensure Test Code works with NUnit4
  • #​606 Support for NUnit 4 legacy asserts
  • #​562 Warn use of params for assertion messages

The primary change is 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):

  • @​CollinAlpert
  • @​manfred-brands
  • @​mikkelbu
  • @​OsirisTerje

Issues Resolved

Features and Enhancements

  • #​620 Make Classic Conversion rule for CollectionAssert improvement
  • #​618 Make Classic Conversion rule for StringAssert
  • #​617 Update .Within makes no sense rule
  • #​615 Add support for Assert.MultipleAsync
  • #​610 Ensure Test Code works with NUnit4
  • #​606 Support for NUnit 4 legacy asserts
  • #​562 Warn use of params for assertion messages

Bugs

  • #​632 NUnit1031 doesn't seem to work with Generic parameters
  • #​631 NUnit1001/NUnit1031 don't observe null forgiveness operator
  • #​621 NUnit2025 fires unnecessarily

Tooling, Process, and Documentation

  • #​633 chore(deps): Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0

Commits viewable in compare view.

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Nov 14, 2025
---
updated-dependencies:
- dependency-name: NUnit.Analyzers
  dependency-version: 4.11.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/nuget/NetSdrClientAppTests/NUnit.Analyzers-4.11.2 branch from 6c97651 to eaf06e1 Compare November 14, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant