Skip to content

Update dependency NUnit.Analyzers to 4.9.0 #822

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 11, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
NUnit.Analyzers 4.8.1 -> 4.9.0 age adoption passing confidence

Release Notes

nunit/nunit.analyzers (NUnit.Analyzers)

v4.9.0: NUnit Analyzers 4.9 - June 11, 2025

Compare Source

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

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


Configuration

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, 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 was generated by Mend Renovate. View the repository job log.

Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4c834f) to head (a709abd).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #822   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          220       220           
  Branches        24        24           
=========================================
  Hits           220       220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

🎳 Stryker Report

Mutation testing badge

📊 Reports

Copy link

Copy link

🏅 Benchmark test report

Expand to see results 🔽

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]     : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2


Method Mean Error StdDev Rank
Moq.GetMock 767.1 ns 4.86 ns 4.55 ns 1
FakeItEasy.GetMock 785.4 ns 6.09 ns 5.69 ns 1
NSubstitute.GetMock 929.8 ns 5.13 ns 4.55 ns 2

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]   : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  ShortRun : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2

Job=ShortRun  IterationCount=3  LaunchCount=1  
WarmupCount=3  

Method Mean Error StdDev Rank Gen0 Gen1 Gen2 Allocated
Moq.CreateContainer 491.1 ms 2,581.4 ms 141.5 ms 1 22000.0000 8000.0000 5000.0000 323.58 MB
NSubstitute.CreateContainer 561.3 ms 2,416.1 ms 132.4 ms 1 22000.0000 8000.0000 5000.0000 317.39 MB
FakeItEasy.CreateContainer 562.8 ms 3,074.7 ms 168.5 ms 1 22000.0000 8000.0000 5000.0000 317.39 MB

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]     : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2


Method Mean Error StdDev Rank
NSubstitute.ResolveSut 988.6 ns 6.29 ns 5.58 ns 1
FakeItEasy.ResolveSut 1,044.6 ns 5.53 ns 4.91 ns 2
Moq.ResolveSut 1,103.4 ns 7.54 ns 6.69 ns 3

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]     : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2


Method Mean Error StdDev Rank
Moq.NonPublicTypes.GetMock 779.7 ns 3.63 ns 3.39 ns 1
FakeItEasy.NonPublicTypes.GetMock 839.9 ns 4.47 ns 4.18 ns 2
NSubstitute.NonPublicTypes.GetMock 850.9 ns 5.40 ns 5.05 ns 2

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]     : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2


Method Mean Error StdDev Rank
NSubstitute.ResolveFrom 1.146 μs 0.0060 μs 0.0053 μs 1
FakeItEasy.ResolveFrom 1.164 μs 0.0039 μs 0.0034 μs 1
Moq.ResolveFrom 1.208 μs 0.0074 μs 0.0070 μs 2

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]     : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2


Method Mean Error StdDev Rank
NSubstitute.StaticResolveSut 958.9 ns 2.49 ns 1.94 ns 1
FakeItEasy.StaticResolveSut 998.5 ns 8.01 ns 7.10 ns 2
Moq.StaticResolveSut 1,040.1 ns 8.89 ns 7.88 ns 3

BenchmarkDotNet v0.15.1, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
.NET SDK 8.0.411
  [Host]   : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
  ShortRun : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2

Job=ShortRun  IterationCount=3  LaunchCount=1  
WarmupCount=3  

Method Mean Error StdDev Rank Gen0 Gen1 Gen2 Allocated
NSubstitute.NonPublicTypes.CreateContainer 2.220 s 0.7103 s 0.0389 s 1 103000.0000 66000.0000 60000.0000 2.22 GB
FakeItEasy.NonPublicTypes.CreateContainer 2.311 s 0.6219 s 0.0341 s 1 102000.0000 65000.0000 59000.0000 2.22 GB
Moq.NonPublicTypes.CreateContainer 2.723 s 0.7033 s 0.0386 s 1 111000.0000 69000.0000 61000.0000 2.31 GB

@renovate renovate bot merged commit 2ad91e9 into main Jun 12, 2025
21 checks passed
@renovate renovate bot deleted the renovate/nunit.analyzers-4.x branch June 12, 2025 03:40
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.

0 participants