From f4ded742b7cb4cbecb54eb41cb8d459d0de4c332 Mon Sep 17 00:00:00 2001 From: Mikkel Nylander Bundgaard Date: Tue, 26 Sep 2023 02:06:31 +0200 Subject: [PATCH] chore: Update documentation of NUnit Analyzers to version 3.8 (#795) * chore: Update documentation of NUnit Analyzers to version 8 * chore: Add word to spell checker * chore: Correct url --- cSpell.json | 1 + .../nunit-analyzers/NUnit-Analyzers.md | 5 + docs/articles/nunit-analyzers/NUnit1001.md | 2 +- docs/articles/nunit-analyzers/NUnit1002.md | 2 +- docs/articles/nunit-analyzers/NUnit1003.md | 2 +- docs/articles/nunit-analyzers/NUnit1004.md | 2 +- docs/articles/nunit-analyzers/NUnit1005.md | 2 +- docs/articles/nunit-analyzers/NUnit1006.md | 2 +- docs/articles/nunit-analyzers/NUnit1007.md | 2 +- docs/articles/nunit-analyzers/NUnit1008.md | 2 +- docs/articles/nunit-analyzers/NUnit1009.md | 2 +- docs/articles/nunit-analyzers/NUnit1010.md | 2 +- docs/articles/nunit-analyzers/NUnit1011.md | 2 +- docs/articles/nunit-analyzers/NUnit1012.md | 2 +- docs/articles/nunit-analyzers/NUnit1013.md | 2 +- docs/articles/nunit-analyzers/NUnit1014.md | 2 +- docs/articles/nunit-analyzers/NUnit1015.md | 2 +- docs/articles/nunit-analyzers/NUnit1016.md | 2 +- docs/articles/nunit-analyzers/NUnit1017.md | 2 +- docs/articles/nunit-analyzers/NUnit1018.md | 2 +- docs/articles/nunit-analyzers/NUnit1019.md | 2 +- docs/articles/nunit-analyzers/NUnit1020.md | 2 +- docs/articles/nunit-analyzers/NUnit1021.md | 2 +- docs/articles/nunit-analyzers/NUnit1022.md | 2 +- docs/articles/nunit-analyzers/NUnit1023.md | 2 +- docs/articles/nunit-analyzers/NUnit1024.md | 2 +- docs/articles/nunit-analyzers/NUnit1025.md | 2 +- docs/articles/nunit-analyzers/NUnit1026.md | 2 +- docs/articles/nunit-analyzers/NUnit1027.md | 2 +- docs/articles/nunit-analyzers/NUnit1028.md | 2 +- docs/articles/nunit-analyzers/NUnit1029.md | 2 +- docs/articles/nunit-analyzers/NUnit1030.md | 2 +- docs/articles/nunit-analyzers/NUnit1031.md | 100 ++++++++++++++++++ docs/articles/nunit-analyzers/NUnit1032.md | 64 +++++++++++ docs/articles/nunit-analyzers/NUnit2001.md | 2 +- docs/articles/nunit-analyzers/NUnit2002.md | 2 +- docs/articles/nunit-analyzers/NUnit2003.md | 2 +- docs/articles/nunit-analyzers/NUnit2004.md | 2 +- docs/articles/nunit-analyzers/NUnit2005.md | 2 +- docs/articles/nunit-analyzers/NUnit2006.md | 2 +- docs/articles/nunit-analyzers/NUnit2007.md | 2 +- docs/articles/nunit-analyzers/NUnit2008.md | 2 +- docs/articles/nunit-analyzers/NUnit2009.md | 2 +- docs/articles/nunit-analyzers/NUnit2010.md | 2 +- docs/articles/nunit-analyzers/NUnit2011.md | 2 +- docs/articles/nunit-analyzers/NUnit2012.md | 2 +- docs/articles/nunit-analyzers/NUnit2013.md | 2 +- docs/articles/nunit-analyzers/NUnit2014.md | 2 +- docs/articles/nunit-analyzers/NUnit2015.md | 2 +- docs/articles/nunit-analyzers/NUnit2016.md | 2 +- docs/articles/nunit-analyzers/NUnit2017.md | 2 +- docs/articles/nunit-analyzers/NUnit2018.md | 2 +- docs/articles/nunit-analyzers/NUnit2019.md | 2 +- docs/articles/nunit-analyzers/NUnit2020.md | 2 +- docs/articles/nunit-analyzers/NUnit2021.md | 2 +- docs/articles/nunit-analyzers/NUnit2022.md | 2 +- docs/articles/nunit-analyzers/NUnit2023.md | 2 +- docs/articles/nunit-analyzers/NUnit2024.md | 2 +- docs/articles/nunit-analyzers/NUnit2025.md | 2 +- docs/articles/nunit-analyzers/NUnit2026.md | 2 +- docs/articles/nunit-analyzers/NUnit2027.md | 2 +- docs/articles/nunit-analyzers/NUnit2028.md | 2 +- docs/articles/nunit-analyzers/NUnit2029.md | 2 +- docs/articles/nunit-analyzers/NUnit2030.md | 2 +- docs/articles/nunit-analyzers/NUnit2031.md | 2 +- docs/articles/nunit-analyzers/NUnit2032.md | 2 +- docs/articles/nunit-analyzers/NUnit2033.md | 2 +- docs/articles/nunit-analyzers/NUnit2034.md | 2 +- docs/articles/nunit-analyzers/NUnit2035.md | 2 +- docs/articles/nunit-analyzers/NUnit2036.md | 2 +- docs/articles/nunit-analyzers/NUnit2037.md | 2 +- docs/articles/nunit-analyzers/NUnit2038.md | 2 +- docs/articles/nunit-analyzers/NUnit2039.md | 2 +- docs/articles/nunit-analyzers/NUnit2040.md | 2 +- docs/articles/nunit-analyzers/NUnit2041.md | 2 +- docs/articles/nunit-analyzers/NUnit2042.md | 2 +- docs/articles/nunit-analyzers/NUnit2043.md | 2 +- docs/articles/nunit-analyzers/NUnit2044.md | 2 +- docs/articles/nunit-analyzers/NUnit2045.md | 2 +- docs/articles/nunit-analyzers/NUnit2046.md | 2 +- docs/articles/nunit-analyzers/NUnit2047.md | 96 +++++++++++++++++ docs/articles/nunit-analyzers/NUnit3001.md | 4 +- docs/articles/nunit-analyzers/NUnit3002.md | 4 +- docs/articles/nunit-analyzers/NUnit3003.md | 64 +++++++++++ docs/articles/nunit-analyzers/NUnit3004.md | 68 ++++++++++++ docs/articles/nunit-analyzers/toc.yml | 12 ++- 86 files changed, 489 insertions(+), 81 deletions(-) create mode 100644 docs/articles/nunit-analyzers/NUnit1031.md create mode 100644 docs/articles/nunit-analyzers/NUnit1032.md create mode 100644 docs/articles/nunit-analyzers/NUnit2047.md create mode 100644 docs/articles/nunit-analyzers/NUnit3003.md create mode 100644 docs/articles/nunit-analyzers/NUnit3004.md diff --git a/cSpell.json b/cSpell.json index 1f246b25e..90d872ed0 100644 --- a/cSpell.json +++ b/cSpell.json @@ -49,6 +49,7 @@ "typeparamref", "Ulps", "ULPs", + "uninstantiated", "unmanaged", "VSIX", "VSIXes", diff --git a/docs/articles/nunit-analyzers/NUnit-Analyzers.md b/docs/articles/nunit-analyzers/NUnit-Analyzers.md index 5a1ec2400..662418db3 100644 --- a/docs/articles/nunit-analyzers/NUnit-Analyzers.md +++ b/docs/articles/nunit-analyzers/NUnit-Analyzers.md @@ -53,6 +53,8 @@ Rules which enforce structural requirements on the test code. | [NUnit1028](NUnit1028.md) | The non-test method is public | :white_check_mark: | :information_source: | :white_check_mark: | | [NUnit1029](NUnit1029.md) | The number of parameters provided by the TestCaseSource does not match the number of parameters in the Test method | :white_check_mark: | :exclamation: | :x: | | [NUnit1030](NUnit1030.md) | The type of parameter provided by the TestCaseSource does not match the type of the parameter in the Test method | :white_check_mark: | :exclamation: | :x: | +| [NUnit1031](NUnit1031.md) | The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method | :white_check_mark: | :exclamation: | :x: | +| [NUnit1032](NUnit1032.md) | An IDisposable field/property should be Disposed in a TearDown method | :white_check_mark: | :exclamation: | :x: | ## Assertion Rules (NUnit2001 - ) @@ -106,6 +108,7 @@ Rules which improve assertions in the test code. | [NUnit2044](NUnit2044.md) | Non-delegate actual parameter | :white_check_mark: | :exclamation: | :white_check_mark: | | [NUnit2045](NUnit2045.md) | Use Assert.Multiple | :white_check_mark: | :information_source: | :white_check_mark: | | [NUnit2046](NUnit2046.md) | Use CollectionConstraint for better assertion messages in case of failure | :white_check_mark: | :information_source: | :white_check_mark: | +| [NUnit2047](NUnit2047.md) | Incompatible types for Within constraint | :white_check_mark: | :warning: | :white_check_mark: | ## Suppressor Rules (NUnit3001 - ) @@ -115,3 +118,5 @@ Rules which suppress compiler errors based on context. Note that these rules are | :-- | :-- | :--: | :--: | :--: | | [NUnit3001](NUnit3001.md) | Expression was checked in an Assert.NotNull, Assert.IsNotNull or Assert.That call | :white_check_mark: | :information_source: | :x: | | [NUnit3002](NUnit3002.md) | Field/Property is initialized in SetUp or OneTimeSetUp method | :white_check_mark: | :information_source: | :x: | +| [NUnit3003](NUnit3003.md) | Class is an NUnit TestFixture and is instantiated using reflection | :white_check_mark: | :information_source: | :x: | +| [NUnit3004](NUnit3004.md) | Field should be Disposed in TearDown or OneTimeTearDown method | :white_check_mark: | :information_source: | :x: | diff --git a/docs/articles/nunit-analyzers/NUnit1001.md b/docs/articles/nunit-analyzers/NUnit1001.md index d652b563a..f744d02cd 100644 --- a/docs/articles/nunit-analyzers/NUnit1001.md +++ b/docs/articles/nunit-analyzers/NUnit1001.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) +| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1002.md b/docs/articles/nunit-analyzers/NUnit1002.md index ff46cd21d..cfcd05c58 100644 --- a/docs/articles/nunit-analyzers/NUnit1002.md +++ b/docs/articles/nunit-analyzers/NUnit1002.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1003.md b/docs/articles/nunit-analyzers/NUnit1003.md index dbaca1f61..a082a1a36 100644 --- a/docs/articles/nunit-analyzers/NUnit1003.md +++ b/docs/articles/nunit-analyzers/NUnit1003.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) +| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1004.md b/docs/articles/nunit-analyzers/NUnit1004.md index d74b50c72..4d32ff3a1 100644 --- a/docs/articles/nunit-analyzers/NUnit1004.md +++ b/docs/articles/nunit-analyzers/NUnit1004.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) +| Code | [TestCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseUsage/TestCaseUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1005.md b/docs/articles/nunit-analyzers/NUnit1005.md index 584256e8e..b3996b42b 100644 --- a/docs/articles/nunit-analyzers/NUnit1005.md +++ b/docs/articles/nunit-analyzers/NUnit1005.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1006.md b/docs/articles/nunit-analyzers/NUnit1006.md index 818383a65..0fef31cfb 100644 --- a/docs/articles/nunit-analyzers/NUnit1006.md +++ b/docs/articles/nunit-analyzers/NUnit1006.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1007.md b/docs/articles/nunit-analyzers/NUnit1007.md index c9562e6c1..1754536e4 100644 --- a/docs/articles/nunit-analyzers/NUnit1007.md +++ b/docs/articles/nunit-analyzers/NUnit1007.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1008.md b/docs/articles/nunit-analyzers/NUnit1008.md index 4a5780332..910eb119d 100644 --- a/docs/articles/nunit-analyzers/NUnit1008.md +++ b/docs/articles/nunit-analyzers/NUnit1008.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Structure -| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) +| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1009.md b/docs/articles/nunit-analyzers/NUnit1009.md index a9ce8c63c..2351c3ab2 100644 --- a/docs/articles/nunit-analyzers/NUnit1009.md +++ b/docs/articles/nunit-analyzers/NUnit1009.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) +| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1010.md b/docs/articles/nunit-analyzers/NUnit1010.md index a81f6768f..29a42de34 100644 --- a/docs/articles/nunit-analyzers/NUnit1010.md +++ b/docs/articles/nunit-analyzers/NUnit1010.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) +| Code | [ParallelizableUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ParallelizableUsage/ParallelizableUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1011.md b/docs/articles/nunit-analyzers/NUnit1011.md index d7e06f974..362935f4e 100644 --- a/docs/articles/nunit-analyzers/NUnit1011.md +++ b/docs/articles/nunit-analyzers/NUnit1011.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1012.md b/docs/articles/nunit-analyzers/NUnit1012.md index e50dbb700..47b83f6e8 100644 --- a/docs/articles/nunit-analyzers/NUnit1012.md +++ b/docs/articles/nunit-analyzers/NUnit1012.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1013.md b/docs/articles/nunit-analyzers/NUnit1013.md index 16ff974ef..fcf733110 100644 --- a/docs/articles/nunit-analyzers/NUnit1013.md +++ b/docs/articles/nunit-analyzers/NUnit1013.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1014.md b/docs/articles/nunit-analyzers/NUnit1014.md index 0ee31097c..ba3aab021 100644 --- a/docs/articles/nunit-analyzers/NUnit1014.md +++ b/docs/articles/nunit-analyzers/NUnit1014.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1015.md b/docs/articles/nunit-analyzers/NUnit1015.md index e793320bf..89fa57f2c 100644 --- a/docs/articles/nunit-analyzers/NUnit1015.md +++ b/docs/articles/nunit-analyzers/NUnit1015.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1016.md b/docs/articles/nunit-analyzers/NUnit1016.md index 8752043b2..85e01c286 100644 --- a/docs/articles/nunit-analyzers/NUnit1016.md +++ b/docs/articles/nunit-analyzers/NUnit1016.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1017.md b/docs/articles/nunit-analyzers/NUnit1017.md index cd3a8a1c2..6ef7fdc54 100644 --- a/docs/articles/nunit-analyzers/NUnit1017.md +++ b/docs/articles/nunit-analyzers/NUnit1017.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1018.md b/docs/articles/nunit-analyzers/NUnit1018.md index 390b79697..09a674f8c 100644 --- a/docs/articles/nunit-analyzers/NUnit1018.md +++ b/docs/articles/nunit-analyzers/NUnit1018.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1019.md b/docs/articles/nunit-analyzers/NUnit1019.md index 268498193..7e442bc82 100644 --- a/docs/articles/nunit-analyzers/NUnit1019.md +++ b/docs/articles/nunit-analyzers/NUnit1019.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1020.md b/docs/articles/nunit-analyzers/NUnit1020.md index 3044a50c7..ffbaa51f6 100644 --- a/docs/articles/nunit-analyzers/NUnit1020.md +++ b/docs/articles/nunit-analyzers/NUnit1020.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1021.md b/docs/articles/nunit-analyzers/NUnit1021.md index 6c61ecfa9..cb19fcc64 100644 --- a/docs/articles/nunit-analyzers/NUnit1021.md +++ b/docs/articles/nunit-analyzers/NUnit1021.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Structure -| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) +| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1022.md b/docs/articles/nunit-analyzers/NUnit1022.md index af322e308..3c6512661 100644 --- a/docs/articles/nunit-analyzers/NUnit1022.md +++ b/docs/articles/nunit-analyzers/NUnit1022.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) +| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1023.md b/docs/articles/nunit-analyzers/NUnit1023.md index ff64611e3..e0f568d3a 100644 --- a/docs/articles/nunit-analyzers/NUnit1023.md +++ b/docs/articles/nunit-analyzers/NUnit1023.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) +| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1024.md b/docs/articles/nunit-analyzers/NUnit1024.md index e6e461426..bd6f89f91 100644 --- a/docs/articles/nunit-analyzers/NUnit1024.md +++ b/docs/articles/nunit-analyzers/NUnit1024.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) +| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1025.md b/docs/articles/nunit-analyzers/NUnit1025.md index 9bad57875..887e971f6 100644 --- a/docs/articles/nunit-analyzers/NUnit1025.md +++ b/docs/articles/nunit-analyzers/NUnit1025.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) +| Code | [ValueSourceUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValueSourceUsage/ValueSourceUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1026.md b/docs/articles/nunit-analyzers/NUnit1026.md index 75ba049b2..24dbaa350 100644 --- a/docs/articles/nunit-analyzers/NUnit1026.md +++ b/docs/articles/nunit-analyzers/NUnit1026.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodAccessibilityLevelAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodAccessibilityLevel/TestMethodAccessibilityLevelAnalyzer.cs) +| Code | [TestMethodAccessibilityLevelAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodAccessibilityLevel/TestMethodAccessibilityLevelAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1027.md b/docs/articles/nunit-analyzers/NUnit1027.md index 83f0fd67a..c4e1b0b9c 100644 --- a/docs/articles/nunit-analyzers/NUnit1027.md +++ b/docs/articles/nunit-analyzers/NUnit1027.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) +| Code | [TestMethodUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestMethodUsage/TestMethodUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1028.md b/docs/articles/nunit-analyzers/NUnit1028.md index 261951cf0..00f6f73d5 100644 --- a/docs/articles/nunit-analyzers/NUnit1028.md +++ b/docs/articles/nunit-analyzers/NUnit1028.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Structure -| Code | [NonTestMethodAccessibilityLevelAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/NonTestMethodAccessibilityLevel/NonTestMethodAccessibilityLevelAnalyzer.cs) +| Code | [NonTestMethodAccessibilityLevelAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/NonTestMethodAccessibilityLevel/NonTestMethodAccessibilityLevelAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1029.md b/docs/articles/nunit-analyzers/NUnit1029.md index dd692df80..53fc80a50 100644 --- a/docs/articles/nunit-analyzers/NUnit1029.md +++ b/docs/articles/nunit-analyzers/NUnit1029.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1030.md b/docs/articles/nunit-analyzers/NUnit1030.md index 984819896..931bcbc11 100644 --- a/docs/articles/nunit-analyzers/NUnit1030.md +++ b/docs/articles/nunit-analyzers/NUnit1030.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Structure -| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) +| Code | [TestCaseSourceUsesStringAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/TestCaseSourceUsage/TestCaseSourceUsesStringAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit1031.md b/docs/articles/nunit-analyzers/NUnit1031.md new file mode 100644 index 000000000..070b29b68 --- /dev/null +++ b/docs/articles/nunit-analyzers/NUnit1031.md @@ -0,0 +1,100 @@ +# NUnit1031 + +## The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method + +| Topic | Value +| :-- | :-- +| Id | NUnit1031 +| Severity | Error +| Enabled | True +| Category | Structure +| Code | [ValuesUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ValuesUsage/ValuesUsageAnalyzer.cs) + +## Description + +The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method. + +## Motivation + +To prevent tests that will fail at runtime due to improper construction. + +## How to fix violations + +### Example Violation + +```csharp +[Test] +public void SampleTest([Values(0.0, 1.0)] int numberValue) +{ + Assert.That(numberValue, Is.AnyOf(0, 1)); +} +``` + +### Problem + +In the test above, `numberValue` is declared as an integer. However, `[Values(0.0, 1.0)]` provides values as doubles. This will lead to a runtime failure. + +### Fix + +Ensure that the type of the objects used by the `ValuesAttribute` matches that of the parameter. + +So, this fix would be acceptable: + +```csharp +// Both use type int. +[Test] +public void SampleTest([Values(0, 1)] int numberValue) +{ + Assert.That(numberValue, Is.AnyOf(0, 1)); +} +``` + +And this would also work: + +```csharp +// Both use type double +[Test] +public void SampleTest([Values(0.0, 1.0)] double numberValue) +{ + Assert.That(numberValue, Is.AnyOf(0, 1)); +} +``` + + +## Configure severity + +### Via ruleset file + +Configure the severity per project, for more info see [MSDN](https://learn.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules?view=vs-2022). + +### Via .editorconfig file + +```ini +# NUnit1031: The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method +dotnet_diagnostic.NUnit1031.severity = chosenSeverity +``` + +where `chosenSeverity` can be one of `none`, `silent`, `suggestion`, `warning`, or `error`. + +### Via #pragma directive + +```csharp +#pragma warning disable NUnit1031 // The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method +Code violating the rule here +#pragma warning restore NUnit1031 // The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method +``` + +Or put this at the top of the file to disable all instances. + +```csharp +#pragma warning disable NUnit1031 // The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method +``` + +### Via attribute `[SuppressMessage]` + +```csharp +[System.Diagnostics.CodeAnalysis.SuppressMessage("Structure", + "NUnit1031:The individual arguments provided by a ValuesAttribute must match the type of the corresponding parameter of the method", + Justification = "Reason...")] +``` + diff --git a/docs/articles/nunit-analyzers/NUnit1032.md b/docs/articles/nunit-analyzers/NUnit1032.md new file mode 100644 index 000000000..ee1caef89 --- /dev/null +++ b/docs/articles/nunit-analyzers/NUnit1032.md @@ -0,0 +1,64 @@ +# NUnit1032 + +## An IDisposable field/property should be Disposed in a TearDown method + +| Topic | Value +| :-- | :-- +| Id | NUnit1032 +| Severity | Error +| Enabled | True +| Category | Structure +| Code | [DisposeFieldsAndPropertiesInTearDownAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DisposeFieldsAndPropertiesInTearDown/DisposeFieldsAndPropertiesInTearDownAnalyzer.cs) + +## Description + +An IDisposable field/property should be Disposed in a TearDown method. + +## Motivation + +Not Disposing fields/properties can cause memory leaks or failing tests. + +## How to fix violations + +Dispose any fields/properties that are initialized in `SetUp` or `Test` methods in a `TearDown` method. +Fields/Properties that are initialized in `OneTimeSetUp`, or with initializers or in constructors +must be disposed in `OneTimeTearDown`. + + +## Configure severity + +### Via ruleset file + +Configure the severity per project, for more info see [MSDN](https://learn.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules?view=vs-2022). + +### Via .editorconfig file + +```ini +# NUnit1032: An IDisposable field/property should be Disposed in a TearDown method +dotnet_diagnostic.NUnit1032.severity = chosenSeverity +``` + +where `chosenSeverity` can be one of `none`, `silent`, `suggestion`, `warning`, or `error`. + +### Via #pragma directive + +```csharp +#pragma warning disable NUnit1032 // An IDisposable field/property should be Disposed in a TearDown method +Code violating the rule here +#pragma warning restore NUnit1032 // An IDisposable field/property should be Disposed in a TearDown method +``` + +Or put this at the top of the file to disable all instances. + +```csharp +#pragma warning disable NUnit1032 // An IDisposable field/property should be Disposed in a TearDown method +``` + +### Via attribute `[SuppressMessage]` + +```csharp +[System.Diagnostics.CodeAnalysis.SuppressMessage("Structure", + "NUnit1032:An IDisposable field/property should be Disposed in a TearDown method", + Justification = "Reason...")] +``` + diff --git a/docs/articles/nunit-analyzers/NUnit2001.md b/docs/articles/nunit-analyzers/NUnit2001.md index 2f5dcb954..fdb83f233 100644 --- a/docs/articles/nunit-analyzers/NUnit2001.md +++ b/docs/articles/nunit-analyzers/NUnit2001.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2002.md b/docs/articles/nunit-analyzers/NUnit2002.md index 46e79eb33..c3d10b07c 100644 --- a/docs/articles/nunit-analyzers/NUnit2002.md +++ b/docs/articles/nunit-analyzers/NUnit2002.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2003.md b/docs/articles/nunit-analyzers/NUnit2003.md index 75824907f..59e3ace40 100644 --- a/docs/articles/nunit-analyzers/NUnit2003.md +++ b/docs/articles/nunit-analyzers/NUnit2003.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2004.md b/docs/articles/nunit-analyzers/NUnit2004.md index c69e6fe99..b25fc8121 100644 --- a/docs/articles/nunit-analyzers/NUnit2004.md +++ b/docs/articles/nunit-analyzers/NUnit2004.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2005.md b/docs/articles/nunit-analyzers/NUnit2005.md index be2e8cc47..c2ba1e046 100644 --- a/docs/articles/nunit-analyzers/NUnit2005.md +++ b/docs/articles/nunit-analyzers/NUnit2005.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2006.md b/docs/articles/nunit-analyzers/NUnit2006.md index 6f85635a3..ef9b381e5 100644 --- a/docs/articles/nunit-analyzers/NUnit2006.md +++ b/docs/articles/nunit-analyzers/NUnit2006.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2007.md b/docs/articles/nunit-analyzers/NUnit2007.md index 3b9b825e1..e98ced4c1 100644 --- a/docs/articles/nunit-analyzers/NUnit2007.md +++ b/docs/articles/nunit-analyzers/NUnit2007.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [ConstActualValueUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstActualValueUsage/ConstActualValueUsageAnalyzer.cs) +| Code | [ConstActualValueUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstActualValueUsage/ConstActualValueUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2008.md b/docs/articles/nunit-analyzers/NUnit2008.md index e206e98c1..a69308f8d 100644 --- a/docs/articles/nunit-analyzers/NUnit2008.md +++ b/docs/articles/nunit-analyzers/NUnit2008.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [IgnoreCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/IgnoreCaseUsage/IgnoreCaseUsageAnalyzer.cs) +| Code | [IgnoreCaseUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/IgnoreCaseUsage/IgnoreCaseUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2009.md b/docs/articles/nunit-analyzers/NUnit2009.md index d8b437868..6165c755c 100644 --- a/docs/articles/nunit-analyzers/NUnit2009.md +++ b/docs/articles/nunit-analyzers/NUnit2009.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [SameActualExpectedValueAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/SameActualExpectedValue/SameActualExpectedValueAnalyzer.cs) +| Code | [SameActualExpectedValueAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/SameActualExpectedValue/SameActualExpectedValueAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2010.md b/docs/articles/nunit-analyzers/NUnit2010.md index a9c03b2e6..9333e825f 100644 --- a/docs/articles/nunit-analyzers/NUnit2010.md +++ b/docs/articles/nunit-analyzers/NUnit2010.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [EqualConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/EqualConstraintUsageAnalyzer.cs) +| Code | [EqualConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/EqualConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2011.md b/docs/articles/nunit-analyzers/NUnit2011.md index 384566172..52ea7e83e 100644 --- a/docs/articles/nunit-analyzers/NUnit2011.md +++ b/docs/articles/nunit-analyzers/NUnit2011.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) +| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2012.md b/docs/articles/nunit-analyzers/NUnit2012.md index a4a57acc9..81920d5a5 100644 --- a/docs/articles/nunit-analyzers/NUnit2012.md +++ b/docs/articles/nunit-analyzers/NUnit2012.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) +| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2013.md b/docs/articles/nunit-analyzers/NUnit2013.md index ca2fa25b1..24fa0d4c0 100644 --- a/docs/articles/nunit-analyzers/NUnit2013.md +++ b/docs/articles/nunit-analyzers/NUnit2013.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) +| Code | [StringConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/StringConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2014.md b/docs/articles/nunit-analyzers/NUnit2014.md index db2fa5d9d..7a6f40033 100644 --- a/docs/articles/nunit-analyzers/NUnit2014.md +++ b/docs/articles/nunit-analyzers/NUnit2014.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [SomeItemsConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/SomeItemsConstraintUsageAnalyzer.cs) +| Code | [SomeItemsConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/SomeItemsConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2015.md b/docs/articles/nunit-analyzers/NUnit2015.md index cb8bbdb2b..4a4040272 100644 --- a/docs/articles/nunit-analyzers/NUnit2015.md +++ b/docs/articles/nunit-analyzers/NUnit2015.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2016.md b/docs/articles/nunit-analyzers/NUnit2016.md index d9b3a5cd9..27d23c956 100644 --- a/docs/articles/nunit-analyzers/NUnit2016.md +++ b/docs/articles/nunit-analyzers/NUnit2016.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2017.md b/docs/articles/nunit-analyzers/NUnit2017.md index 536c816cf..fdaad8fe4 100644 --- a/docs/articles/nunit-analyzers/NUnit2017.md +++ b/docs/articles/nunit-analyzers/NUnit2017.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2018.md b/docs/articles/nunit-analyzers/NUnit2018.md index f383be5fb..f719a3d8a 100644 --- a/docs/articles/nunit-analyzers/NUnit2018.md +++ b/docs/articles/nunit-analyzers/NUnit2018.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2019.md b/docs/articles/nunit-analyzers/NUnit2019.md index f1932193c..70794d3de 100644 --- a/docs/articles/nunit-analyzers/NUnit2019.md +++ b/docs/articles/nunit-analyzers/NUnit2019.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2020.md b/docs/articles/nunit-analyzers/NUnit2020.md index 2dd3cdf51..f93820db3 100644 --- a/docs/articles/nunit-analyzers/NUnit2020.md +++ b/docs/articles/nunit-analyzers/NUnit2020.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [SameAsIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/SameAsIncompatibleTypes/SameAsIncompatibleTypesAnalyzer.cs) +| Code | [SameAsIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/SameAsIncompatibleTypes/SameAsIncompatibleTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2021.md b/docs/articles/nunit-analyzers/NUnit2021.md index f51c0aca8..52dd690d7 100644 --- a/docs/articles/nunit-analyzers/NUnit2021.md +++ b/docs/articles/nunit-analyzers/NUnit2021.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [EqualToIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/EqualToIncompatibleTypes/EqualToIncompatibleTypesAnalyzer.cs) +| Code | [EqualToIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/EqualToIncompatibleTypes/EqualToIncompatibleTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2022.md b/docs/articles/nunit-analyzers/NUnit2022.md index 85ec48176..f4bb055d1 100644 --- a/docs/articles/nunit-analyzers/NUnit2022.md +++ b/docs/articles/nunit-analyzers/NUnit2022.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [MissingPropertyAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/MissingProperty/MissingPropertyAnalyzer.cs) +| Code | [MissingPropertyAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/MissingProperty/MissingPropertyAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2023.md b/docs/articles/nunit-analyzers/NUnit2023.md index d0c3224f6..9329a5c6e 100644 --- a/docs/articles/nunit-analyzers/NUnit2023.md +++ b/docs/articles/nunit-analyzers/NUnit2023.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [NullConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/NullConstraintUsage/NullConstraintUsageAnalyzer.cs) +| Code | [NullConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/NullConstraintUsage/NullConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2024.md b/docs/articles/nunit-analyzers/NUnit2024.md index ce8410c82..7b6f2b064 100644 --- a/docs/articles/nunit-analyzers/NUnit2024.md +++ b/docs/articles/nunit-analyzers/NUnit2024.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [StringConstraintWrongActualTypeAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/StringConstraintWrongActualType/StringConstraintWrongActualTypeAnalyzer.cs) +| Code | [StringConstraintWrongActualTypeAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/StringConstraintWrongActualType/StringConstraintWrongActualTypeAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2025.md b/docs/articles/nunit-analyzers/NUnit2025.md index dc078e1c1..613a43efa 100644 --- a/docs/articles/nunit-analyzers/NUnit2025.md +++ b/docs/articles/nunit-analyzers/NUnit2025.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [ContainsConstraintWrongActualTypeAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ContainsConstraintWrongActualType/ContainsConstraintWrongActualTypeAnalyzer.cs) +| Code | [ContainsConstraintWrongActualTypeAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ContainsConstraintWrongActualType/ContainsConstraintWrongActualTypeAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2026.md b/docs/articles/nunit-analyzers/NUnit2026.md index 0c6e275af..a86ef1d6b 100644 --- a/docs/articles/nunit-analyzers/NUnit2026.md +++ b/docs/articles/nunit-analyzers/NUnit2026.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [SomeItemsIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/SomeItemsIncompatibleTypes/SomeItemsIncompatibleTypesAnalyzer.cs) +| Code | [SomeItemsIncompatibleTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/SomeItemsIncompatibleTypes/SomeItemsIncompatibleTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2027.md b/docs/articles/nunit-analyzers/NUnit2027.md index e5bd1b9e0..5ffe7088d 100644 --- a/docs/articles/nunit-analyzers/NUnit2027.md +++ b/docs/articles/nunit-analyzers/NUnit2027.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2028.md b/docs/articles/nunit-analyzers/NUnit2028.md index bfb0c0f44..15b6d683b 100644 --- a/docs/articles/nunit-analyzers/NUnit2028.md +++ b/docs/articles/nunit-analyzers/NUnit2028.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2029.md b/docs/articles/nunit-analyzers/NUnit2029.md index 045e17ba4..e14759074 100644 --- a/docs/articles/nunit-analyzers/NUnit2029.md +++ b/docs/articles/nunit-analyzers/NUnit2029.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2030.md b/docs/articles/nunit-analyzers/NUnit2030.md index fd1a0f98f..ae3debac1 100644 --- a/docs/articles/nunit-analyzers/NUnit2030.md +++ b/docs/articles/nunit-analyzers/NUnit2030.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2031.md b/docs/articles/nunit-analyzers/NUnit2031.md index 89b49e135..13ccfb2a0 100644 --- a/docs/articles/nunit-analyzers/NUnit2031.md +++ b/docs/articles/nunit-analyzers/NUnit2031.md @@ -8,7 +8,7 @@ | Severity | Warning | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2032.md b/docs/articles/nunit-analyzers/NUnit2032.md index 7ba243f7d..f530631ea 100644 --- a/docs/articles/nunit-analyzers/NUnit2032.md +++ b/docs/articles/nunit-analyzers/NUnit2032.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2033.md b/docs/articles/nunit-analyzers/NUnit2033.md index 6b85c1793..222250549 100644 --- a/docs/articles/nunit-analyzers/NUnit2033.md +++ b/docs/articles/nunit-analyzers/NUnit2033.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2034.md b/docs/articles/nunit-analyzers/NUnit2034.md index 646245f42..a9dec0274 100644 --- a/docs/articles/nunit-analyzers/NUnit2034.md +++ b/docs/articles/nunit-analyzers/NUnit2034.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2035.md b/docs/articles/nunit-analyzers/NUnit2035.md index 2c2dd693f..cd7ab5a18 100644 --- a/docs/articles/nunit-analyzers/NUnit2035.md +++ b/docs/articles/nunit-analyzers/NUnit2035.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2036.md b/docs/articles/nunit-analyzers/NUnit2036.md index b1ab2e39e..3c2f3e45e 100644 --- a/docs/articles/nunit-analyzers/NUnit2036.md +++ b/docs/articles/nunit-analyzers/NUnit2036.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2037.md b/docs/articles/nunit-analyzers/NUnit2037.md index 30a651d75..d0ea6584f 100644 --- a/docs/articles/nunit-analyzers/NUnit2037.md +++ b/docs/articles/nunit-analyzers/NUnit2037.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2038.md b/docs/articles/nunit-analyzers/NUnit2038.md index dc5d602ed..da371a473 100644 --- a/docs/articles/nunit-analyzers/NUnit2038.md +++ b/docs/articles/nunit-analyzers/NUnit2038.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2039.md b/docs/articles/nunit-analyzers/NUnit2039.md index de0dc64d2..49c15459e 100644 --- a/docs/articles/nunit-analyzers/NUnit2039.md +++ b/docs/articles/nunit-analyzers/NUnit2039.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) +| Code | [ClassicModelAssertUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ClassicModelAssertUsage/ClassicModelAssertUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2040.md b/docs/articles/nunit-analyzers/NUnit2040.md index fcd3b3fb5..fb6a4b6d3 100644 --- a/docs/articles/nunit-analyzers/NUnit2040.md +++ b/docs/articles/nunit-analyzers/NUnit2040.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [SameAsOnValueTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/SameAsOnValueTypes/SameAsOnValueTypesAnalyzer.cs) +| Code | [SameAsOnValueTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/SameAsOnValueTypes/SameAsOnValueTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2041.md b/docs/articles/nunit-analyzers/NUnit2041.md index 0dfba55e4..2c407c1e9 100644 --- a/docs/articles/nunit-analyzers/NUnit2041.md +++ b/docs/articles/nunit-analyzers/NUnit2041.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [ComparableTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ComparableTypes/ComparableTypesAnalyzer.cs) +| Code | [ComparableTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ComparableTypes/ComparableTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2042.md b/docs/articles/nunit-analyzers/NUnit2042.md index ecbcf4f1d..b7c5da231 100644 --- a/docs/articles/nunit-analyzers/NUnit2042.md +++ b/docs/articles/nunit-analyzers/NUnit2042.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ComparableTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ComparableTypes/ComparableTypesAnalyzer.cs) +| Code | [ComparableTypesAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ComparableTypes/ComparableTypesAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2043.md b/docs/articles/nunit-analyzers/NUnit2043.md index 1833ec7f4..39dca94d0 100644 --- a/docs/articles/nunit-analyzers/NUnit2043.md +++ b/docs/articles/nunit-analyzers/NUnit2043.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [ComparisonConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/ConstraintUsage/ComparisonConstraintUsageAnalyzer.cs) +| Code | [ComparisonConstraintUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/ConstraintUsage/ComparisonConstraintUsageAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2044.md b/docs/articles/nunit-analyzers/NUnit2044.md index 83d7fd1fc..a7869196f 100644 --- a/docs/articles/nunit-analyzers/NUnit2044.md +++ b/docs/articles/nunit-analyzers/NUnit2044.md @@ -8,7 +8,7 @@ | Severity | Error | Enabled | True | Category | Assertion -| Code | [DelegateRequiredAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/DelegateRequired/DelegateRequiredAnalyzer.cs) +| Code | [DelegateRequiredAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DelegateRequired/DelegateRequiredAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2045.md b/docs/articles/nunit-analyzers/NUnit2045.md index 675d4c0da..2e853bf5f 100644 --- a/docs/articles/nunit-analyzers/NUnit2045.md +++ b/docs/articles/nunit-analyzers/NUnit2045.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [UseAssertMultipleAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/UseAssertMultiple/UseAssertMultipleAnalyzer.cs) +| Code | [UseAssertMultipleAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/UseAssertMultiple/UseAssertMultipleAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2046.md b/docs/articles/nunit-analyzers/NUnit2046.md index 06a7cfaae..12f82144e 100644 --- a/docs/articles/nunit-analyzers/NUnit2046.md +++ b/docs/articles/nunit-analyzers/NUnit2046.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Assertion -| Code | [UseCollectionConstraintAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/UseCollectionConstraint/UseCollectionConstraintAnalyzer.cs) +| Code | [UseCollectionConstraintAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/UseCollectionConstraint/UseCollectionConstraintAnalyzer.cs) ## Description diff --git a/docs/articles/nunit-analyzers/NUnit2047.md b/docs/articles/nunit-analyzers/NUnit2047.md new file mode 100644 index 000000000..e9cc23875 --- /dev/null +++ b/docs/articles/nunit-analyzers/NUnit2047.md @@ -0,0 +1,96 @@ +# NUnit2047 + +## Incompatible types for Within constraint + +| Topic | Value +| :-- | :-- +| Id | NUnit2047 +| Severity | Warning +| Enabled | True +| Category | Assertion +| Code | [WithinUsageAnalyzer](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/WithinUsage/WithinUsageAnalyzer.cs) + +## Description + +The `Within` modifier should only be used for numeric or Date/Time arguments or tuples containing only these element types. Using it on other types will not have any effect. + +## Motivation + +To bring developers' attention to a scenario in which their code is actually having no effect and may reveal that their test is not doing what they expect. + +## How to fix violations + +### Example Violation + +```csharp +[Test] +public void RecordsEqualsMismatch() +{ + var a = new Data(1, 1.0); + var b = new Data(1, 1.1); + + Assert.That(a, Is.EqualTo(b).Within(0.2), $"{a} != {b}"); +} + +private sealed record Data(int number, double Value); +``` + +### Explanation + +Using `Within` here doesn't make any sense, because NUnit cannot apply comparison with tolerance to the types we're comparing. + +### Fix + +Remove the errant call to `Within`: + +```csharp +[Test] +public void RecordsEqualsMismatch() +{ + var a = new Data(1, 1.0); + var b = new Data(1, 1.1); + + Assert.That(a, Is.EqualTo(b), $"{a} != {b}"); +} + +private sealed record Data(int number, double Value); +``` + + +## Configure severity + +### Via ruleset file + +Configure the severity per project, for more info see [MSDN](https://learn.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules?view=vs-2022). + +### Via .editorconfig file + +```ini +# NUnit2047: Incompatible types for Within constraint +dotnet_diagnostic.NUnit2047.severity = chosenSeverity +``` + +where `chosenSeverity` can be one of `none`, `silent`, `suggestion`, `warning`, or `error`. + +### Via #pragma directive + +```csharp +#pragma warning disable NUnit2047 // Incompatible types for Within constraint +Code violating the rule here +#pragma warning restore NUnit2047 // Incompatible types for Within constraint +``` + +Or put this at the top of the file to disable all instances. + +```csharp +#pragma warning disable NUnit2047 // Incompatible types for Within constraint +``` + +### Via attribute `[SuppressMessage]` + +```csharp +[System.Diagnostics.CodeAnalysis.SuppressMessage("Assertion", + "NUnit2047:Incompatible types for Within constraint", + Justification = "Reason...")] +``` + diff --git a/docs/articles/nunit-analyzers/NUnit3001.md b/docs/articles/nunit-analyzers/NUnit3001.md index 5e11b44bc..bc770acc1 100644 --- a/docs/articles/nunit-analyzers/NUnit3001.md +++ b/docs/articles/nunit-analyzers/NUnit3001.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Suppressor -| Code | [DereferencePossiblyNullReferenceSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressor.cs) +| Code | [DereferencePossiblyNullReferenceSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressor.cs) ## Description @@ -90,7 +90,7 @@ The rule has no severity, but can be disabled. ### Via ruleset file To disable the rule for a project, you need to add a -[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) +[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) ```xml diff --git a/docs/articles/nunit-analyzers/NUnit3002.md b/docs/articles/nunit-analyzers/NUnit3002.md index 06e2cde9d..3bd84f420 100644 --- a/docs/articles/nunit-analyzers/NUnit3002.md +++ b/docs/articles/nunit-analyzers/NUnit3002.md @@ -8,7 +8,7 @@ | Severity | Info | Enabled | True | Category | Suppressor -| Code | [NonNullableFieldOrPropertyIsUninitializedSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/DiagnosticSuppressors/NonNullableFieldOrPropertyIsUninitializedSuppressor.cs) +| Code | [NonNullableFieldOrPropertyIsUninitializedSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/NonNullableFieldOrPropertyIsUninitializedSuppressor.cs) ## Description @@ -60,7 +60,7 @@ The rule has no severity, but can be disabled. ### Via ruleset file To disable the rule for a project, you need to add a -[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.6.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) +[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) ```xml diff --git a/docs/articles/nunit-analyzers/NUnit3003.md b/docs/articles/nunit-analyzers/NUnit3003.md new file mode 100644 index 000000000..06b636f4f --- /dev/null +++ b/docs/articles/nunit-analyzers/NUnit3003.md @@ -0,0 +1,64 @@ +# NUnit3003 + +## Class is an NUnit TestFixture and is instantiated using reflection + +| Topic | Value +| :-- | :-- +| Id | NUnit3003 +| Severity | Info +| Enabled | True +| Category | Suppressor +| Code | [AvoidUninstantiatedInternalClassSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/AvoidUninstantiatedInternalClassSuppressor.cs) + +## Description + +Class is a NUnit TestFixture and called by reflection + +## Motivation + +The default roslyn analyzer has rule [CA1812](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1812) +which warns about internal classes not being used. +That analyzer doesn't know about NUnit test classes. +This suppressor catches the error, verifies the class is an NUnit TestFixture and if so suppresses the error. + + +## Configure severity + +The rule has no severity, but can be disabled. + +### Via ruleset file + +To disable the rule for a project, you need to add a +[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) + +```xml + + + + + + + + + +``` + +and add it to the project like: + +```xml + + NUnit.Analyzers.Suppressions.ruleset + +``` + +For more info about rulesets see [MSDN](https://learn.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules?view=vs-2022). + +### Via .editorconfig file + +This is currently not working. Waiting for [Roslyn](https://github.com/dotnet/roslyn/issues/49727) + +```ini +# NUnit3003: Class is an NUnit TestFixture and is instantiated using reflection +dotnet_diagnostic.NUnit3003.severity = none +``` + diff --git a/docs/articles/nunit-analyzers/NUnit3004.md b/docs/articles/nunit-analyzers/NUnit3004.md new file mode 100644 index 000000000..479a57fda --- /dev/null +++ b/docs/articles/nunit-analyzers/NUnit3004.md @@ -0,0 +1,68 @@ +# NUnit3004 + +## Field should be Disposed in TearDown or OneTimeTearDown method + +| Topic | Value +| :-- | :-- +| Id | NUnit3004 +| Severity | Info +| Enabled | True +| Category | Suppressor +| Code | [TypesThatOwnDisposableFieldsShouldBeDisposableSuppressor](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/TypesThatOwnDisposableFieldsShouldBeDisposableSuppressor.cs) + +## Description + +Field/Property is Disposed in TearDown or OneTimeTearDown method + +## Motivation + +The Roslyn analyzer fires [CA1001](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1001) +for classes that have [`IDisposable`](https://learn.microsoft.com/en-us/dotnet/api/system.idisposable) members, but itself is not `IDisposable`. + +Many NUnit tests initialize fields in tests or a `SetUp` method and then `Dispose` them in the `TearDown` method. + +## How to fix violations + +Ensure that all `IDisposable` fields have a `Dispose` call in the `TearDown` method. + + +## Configure severity + +The rule has no severity, but can be disabled. + +### Via ruleset file + +To disable the rule for a project, you need to add a +[ruleset file](https://github.com/nunit/nunit.analyzers/blob/3.8.0/src/nunit.analyzers/DiagnosticSuppressors/NUnit.Analyzers.Suppressions.ruleset) + +```xml + + + + + + + + + +``` + +and add it to the project like: + +```xml + + NUnit.Analyzers.Suppressions.ruleset + +``` + +For more info about rulesets see [MSDN](https://learn.microsoft.com/en-us/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules?view=vs-2022). + +### Via .editorconfig file + +This is currently not working. Waiting for [Roslyn](https://github.com/dotnet/roslyn/issues/49727) + +```ini +# NUnit3004: Field should be Disposed in TearDown or OneTimeTearDown method +dotnet_diagnostic.NUnit3004.severity = none +``` + diff --git a/docs/articles/nunit-analyzers/toc.yml b/docs/articles/nunit-analyzers/toc.yml index eaabe93db..2ef897dff 100644 --- a/docs/articles/nunit-analyzers/toc.yml +++ b/docs/articles/nunit-analyzers/toc.yml @@ -61,6 +61,10 @@ href: NUnit1029.md - name: NUnit1030 href: NUnit1030.md + - name: NUnit1031 + href: NUnit1031.md + - name: NUnit1032 + href: NUnit1032.md - name: NUnit2001 href: NUnit2001.md - name: NUnit2002 @@ -153,7 +157,13 @@ href: NUnit2045.md - name: NUnit2046 href: NUnit2046.md + - name: NUnit2047 + href: NUnit2047.md - name: NUnit3001 href: NUnit3001.md - name: NUnit3002 - href: NUnit3002.md \ No newline at end of file + href: NUnit3002.md + - name: NUnit3003 + href: NUnit3003.md + - name: NUnit3004 + href: NUnit3004.md \ No newline at end of file