Skip to content

Conversation

@thomhurst
Copy link
Owner

This PR contains the following updates:

Package Type Update Change
NUnit.Analyzers nuget minor 4.10.0 -> 4.11.0

Release Notes

nunit/nunit.analyzers (NUnit.Analyzers)

v4.11.0: NUnit Analyzers 4.11 - October 28, 2025

Compare Source

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

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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@thomhurst thomhurst added dependencies Pull requests that update a dependency file MINOR renovate-bot labels Oct 28, 2025
@thomhurst thomhurst enabled auto-merge (squash) October 28, 2025 23:11
@claude
Copy link
Contributor

claude bot commented Oct 28, 2025

Claude finished @thomhurst's task —— View job


PR Review: NUnit.Analyzers Update to 4.11.0

Todo List:

  • Read and analyze the changed file (Directory.Packages.props)
  • Review release notes impact on TUnit codebase
  • Check for potential compatibility issues
  • Analyze security and performance implications
  • Provide final review feedback

Review Feedback

Code Quality & Best Practices

  • Clean change: Single line version bump in centralized package management
  • Consistent versioning: Follows semantic versioning (minor update 4.10.0 → 4.11.0)
  • Proper dependency management: Uses Directory.Packages.props for centralized version control

Security & Performance

  • Low risk: Analyzer tools run at compile-time only, no runtime security impact
  • Performance neutral: Analyzers may be slightly more efficient with the IDisposable improvements
  • No breaking changes: Minor version bump indicates backward compatibility

Compatibility Assessment

  • Minimal impact: TUnit uses its own lifecycle methods ([Before(Class)], [Before(Test)]) rather than NUnit's SetUp/TearDown patterns
  • Limited scope: NUnit.Analyzers only used in test projects and tooling, not core TUnit functionality
  • Safe upgrade: Release notes show improvements and bug fixes without breaking changes

📋 Release 4.11.0 Benefits for TUnit

  1. Better IDisposable analysis in overridden methods and local functions
  2. Improved diagnostic positioning for TestCase attributes with multiple parameters
  3. Enhanced inline using detection (false positive fixes)
  4. Bug fixes for generic parameter handling

🔧 Optional Enhancements

The new .editorconfig options for custom setup/teardown methods could be useful if TUnit wanted analyzer coverage for its own lifecycle methods:

dotnet_diagnostic.NUnit.additional_setup_methods = Before
dotnet_diagnostic.NUnit.additional_teardown_methods = After

However, this is not necessary since TUnit has its own analyzer infrastructure.

🚦 Recommendation

✅ APPROVE - This is a safe, beneficial update with no compatibility concerns for TUnit.


@thomhurst thomhurst merged commit de33f31 into main Oct 28, 2025
13 checks passed
@thomhurst thomhurst deleted the renovate/nunit branch October 28, 2025 23:34
This was referenced Oct 29, 2025
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 MINOR renovate-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants