From 518480dfa566752b979306b2f5c9857bb6ba22e9 Mon Sep 17 00:00:00 2001 From: Christoph Amrein Date: Tue, 16 Nov 2021 14:50:51 +0100 Subject: [PATCH 1/2] Removed ToImmutableDictionary and ToImmutableHashSet from the reported methods --- .../Bugs/LinqToCollectionOnConcurrentDictionaryAnalyzer.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ParallelHelper/Analyzer/Bugs/LinqToCollectionOnConcurrentDictionaryAnalyzer.cs b/src/ParallelHelper/Analyzer/Bugs/LinqToCollectionOnConcurrentDictionaryAnalyzer.cs index 2a7f43f..1b6b0b7 100644 --- a/src/ParallelHelper/Analyzer/Bugs/LinqToCollectionOnConcurrentDictionaryAnalyzer.cs +++ b/src/ParallelHelper/Analyzer/Bugs/LinqToCollectionOnConcurrentDictionaryAnalyzer.cs @@ -46,8 +46,6 @@ public class LinqToCollectionOnConcurrentDictionaryAnalyzer : DiagnosticAnalyzer private static readonly ClassMemberDescriptor[] LinqDescriptors = { new ClassMemberDescriptor("System.Linq.Enumerable", "ToArray", "ToList"), new ClassMemberDescriptor("System.Collections.Immutable.ImmutableArray", "ToImmutableArray"), - new ClassMemberDescriptor("System.Collections.Immutable.ImmutableDictionary", "ToImmutableDictionary"), - new ClassMemberDescriptor("System.Collections.Immutable.ImmutableHashSet", "ToImmutableHashSet"), new ClassMemberDescriptor("System.Collections.Immutable.ImmutableList", "ToImmutableList"), }; From c59910474379f162ac3fa041da33d31cfd964c5f Mon Sep 17 00:00:00 2001 From: Christoph Amrein Date: Tue, 16 Nov 2021 14:54:44 +0100 Subject: [PATCH 2/2] Added PH_B008 changes to the release notes --- src/ParallelHelper.Plugin/ReleaseNotes.txt | 1 + src/ParallelHelper/ParallelHelper.csproj | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ParallelHelper.Plugin/ReleaseNotes.txt b/src/ParallelHelper.Plugin/ReleaseNotes.txt index cd42dd1..a5d8805 100644 --- a/src/ParallelHelper.Plugin/ReleaseNotes.txt +++ b/src/ParallelHelper.Plugin/ReleaseNotes.txt @@ -3,6 +3,7 @@ - Improved Analyzer: PH_S019 - Now matches parameter types (only the first by default) - Improved Analyzer: PH_B004 - Now only respects the while-loop's condition - Improved Analyzer: PH_B009 - Now ignores readonly fields by default +- Improved Analyzer: PH_B008 - No longer reports ToImmutableDictionary and ToImmutableHashSet ------------------ diff --git a/src/ParallelHelper/ParallelHelper.csproj b/src/ParallelHelper/ParallelHelper.csproj index 2870a1f..b17733e 100644 --- a/src/ParallelHelper/ParallelHelper.csproj +++ b/src/ParallelHelper/ParallelHelper.csproj @@ -19,7 +19,8 @@ ParallelHelper is a static code analyzer that helps to identify concurrency related issues. Moreover, it provides hints to improve the robustness of code with concurrency in mind. - Improved Analyzer: PH_S019 - Now matches parameter types (only the first by default) - Improved Analyzer: PH_B004 - Now only respects the while-loop's condition -- Improved Analyzer: PH_B009 - Now ignores readonly fields by default +- Improved Analyzer: PH_B009 - Now ignores readonly fields by default +- Improved Analyzer: PH_B008 - No longer reports ToImmutableDictionary and ToImmutableHashSet Copyright (C) 2019 - 2021 Christoph Amrein, Concurrency Lab, Eastern Switzerland University of Applied Sciences, Switzerland C#, Parallel, Asynchronous, Concurrency, Bugs, Best Practices, TPL, Task, QC, Static Analysis, async, await true