Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Manfred Brands 669ee3a646 Increase IDE0005 to warning and remove all unnecessary using statements 2023-10-28 12:18:23 +08:00
Manfred Brands 81c26ba193
DisposableFieldsSuppressor and Analyzer (#576)
* Add DisposableFieldsSuppressor and DisposeFieldsInTearDownAnalyzer

* Code review  changes.

* Add support for more cases

* await
* ConfigureAwait
* try
* finally
* Close is recognized as Dispose method

* Enhancements:

* Ignore classes that are not a TestFixture
* Ignore some types that don't need Disposing, e.g. Task
* Only check fields assigned from constructors and methods, not from copy and other expressions.

* Add support for properties and constructors/initializers

* Add support for conditional Dispose

* Add support for field with a TypeParameter type

* Rename 'fields' with better name.

* Added Parameters class so we don't need to pass in lots of fields.

Add support for Release(field) and allow configuring extra release methods.

* Changed to use single HashSet per operation.

Previously it created several and then merged them.

* Code review commit
2023-09-06 09:11:01 +08:00
Manfred Brands 6dd8dddab2 Added 'CSharpIsNullAnalyzer' to ensure ' == null' no longer slips in. 2023-05-01 11:17:30 +08:00
Manfred Brands d29df368e6 Move to Gu.Roslyn.Asserts 4.2.0 2022-05-02 10:23:34 +02:00
Manfred Brands 59c03946c3 Stylecop.json is no longer needed.
stylecop now supports .editorconfig
2022-04-22 08:41:36 +08:00
Manfred Brands b886583979 Changed code style suggestions to warnings 2022-03-19 09:20:46 +08:00
Manfred Brands b7ed05362c Upgrade to .NET6 SDK
- Move common definitions from individual .csproj files to Directory.Build.props
- Fix nullability issues.
- Do what we preach, reference nunit.analyzers as an Analyzer
2022-03-19 09:18:22 +08:00
Manfred Brands 55e4694197 Upgrade from FxCopAnalyzers to NetAnalyzers 2021-02-07 12:04:33 +08:00
Manfred Brands d5fe95852e Added Microsoft.CodeAnalysis.Analyzers and updated other packages.
Removed deprecated PackageTargetFallback
2020-11-22 13:09:31 +08:00
Manfred Brands 55c552a2cc CA1707: Identifiers should not contain underscores 2020-08-31 08:18:16 +08:00
Manfred Brands acdba8a00f Add FxCop Analyzer 2020-08-31 08:18:15 +08:00
Oleksandr Liakhevych 6c30d784f5 Apply suggestions from code review 2020-08-28 16:12:52 +03:00
Oleksandr Liakhevych e5d3733fd3
Apply suggestions from code review
Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>
2020-08-28 16:06:04 +03:00
Manfred Brands 44d6873b3d Enable SA1623: Property summary documentation should match accessors 2020-08-26 02:32:26 +03:00
Manfred Brands 69265fa2fd Enable SA1401: Fields should be private 2020-08-26 02:32:26 +03:00
Manfred Brands 44cf578d97 Enable SA1202: Elements should be ordered by access 2020-08-26 02:32:26 +03:00
Manfred Brands 90feddba42 Enable SA1201: Elements should appear in the correct order 2020-08-26 02:32:26 +03:00
Manfred Brands ec429cde28 Enable SA1200: Using Directives. 2020-08-26 02:32:26 +03:00
Oleksandr Liakhevych 676c7f7a9c Add StyleCop to project 2020-08-21 20:19:31 +03:00
Manfred Brands dfeca3e197
Update comments in .editorconfig
Co-authored-by: Mikkel Nylander Bundgaard <mikkelbu@users.noreply.github.com>
2020-07-25 09:39:27 +08:00
Manfred Brands e8be8e55dd Update .editorconfig to match overall code-style used.
Fix two multi-line 'if' statements by adding braces.
Fix a few places that were not conforming to the overall code-style.
2020-07-22 12:12:32 +08:00
JohanLarsson 3ad6c240e3 Fix comments on PR. 2018-03-26 08:30:06 +02:00
JohanLarsson 42b7f2009e Add more tags. 2018-03-23 20:14:31 +01:00
JohanLarsson f04526a997 .editorconfig fix #22.
Start with defaults from https://raw.githubusercontent.com/nunit/nunit/master/.editorconfig
2018-03-23 20:00:26 +01:00