From 3c000f7d0fc594c4455871fe38e406cf73b08032 Mon Sep 17 00:00:00 2001 From: Mikkel Nylander Bundgaard Date: Sat, 14 Dec 2024 10:01:19 +0000 Subject: [PATCH] doc: Improve documentation of NUnit1032 By including example of `additional_dispose_methods`. --- documentation/NUnit1032.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/documentation/NUnit1032.md b/documentation/NUnit1032.md index ea9bb6f1..59008ddc 100644 --- a/documentation/NUnit1032.md +++ b/documentation/NUnit1032.md @@ -60,6 +60,17 @@ dotnet_diagnostic.CA1001.severity = warning dotnet_diagnostic.CA2213.severity = warning ``` +## Extending the list of names of disposing methods + +The analyzer considers the following list of method names to be disposing: `Dispose`, `DisposeAsync`, `Close`, and +`CloseAsync`. It is possible to add method names to this list by using the configuration +`dotnet_diagnostic.NUnit1032.additional_dispose_methods` in the `.editorconfig`. I.e. to add `Quit` to the list add +the following line. + +```ini +dotnet_diagnostic.NUnit1032.additional_dispose_methods = Quit +``` + ## Configure severity