diff --git a/eng/Versions.props b/eng/Versions.props
index 49c7460af8..a7a38961fa 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -22,7 +22,7 @@
3.0.0
3.5.0-beta2-20056-01
- 3.5.0-beta4-20153-05
+ 3.6.0-1.final
3.0.0-beta2.19529.2+e119d9cf
$(DogfoodAnalyzersVersion)
$(DogfoodAnalyzersVersion)
diff --git a/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Core/SymbolIsBannedAnalyzer.cs b/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Core/SymbolIsBannedAnalyzer.cs
index 3b81230981..22ef5e39fd 100644
--- a/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Core/SymbolIsBannedAnalyzer.cs
+++ b/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Core/SymbolIsBannedAnalyzer.cs
@@ -73,7 +73,7 @@ private void OnCompilationStart(CompilationStartAnalysisContext compilationConte
return;
}
- var entryByAttributeSymbol = entryBySymbol
+ Dictionary.BanFileEntry> entryByAttributeSymbol = entryBySymbol
.Where(pair => pair.Key is ITypeSymbol n && n.IsAttribute())
.ToDictionary(pair => pair.Key, pair => pair.Value);
diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidUninstantiatedInternalClasses.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidUninstantiatedInternalClasses.cs
index d792576a19..cc70b4e109 100644
--- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidUninstantiatedInternalClasses.cs
+++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidUninstantiatedInternalClasses.cs
@@ -44,7 +44,7 @@ public override void Initialize(AnalysisContext analysisContext)
analysisContext.RegisterCompilationStartAction(startContext =>
{
- var instantiatedTypes = new ConcurrentDictionary();
+ ConcurrentDictionary instantiatedTypes = new ConcurrentDictionary();
var internalTypes = new ConcurrentDictionary();
var compilation = startContext.Compilation;
diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs
index aa7c626e69..19ca041933 100644
--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs
+++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotPassLiteralsAsLocalizedParameters.cs
@@ -66,7 +66,7 @@ public override void Initialize(AnalysisContext context)
return;
}
- var lazyValueContentResult = new Lazy?>(
+ Lazy?> lazyValueContentResult = new Lazy?>(
valueFactory: ComputeValueContentAnalysisResult, isThreadSafe: false);
operationBlockStartContext.RegisterOperationAction(operationContext =>
diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotReferSelfInSerializableClass.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotReferSelfInSerializableClass.cs
index 8752c5ff95..f870bc9891 100644
--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotReferSelfInSerializableClass.cs
+++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotReferSelfInSerializableClass.cs
@@ -66,14 +66,14 @@ public sealed override void Initialize(AnalysisContext context)
return;
}
- var forwardGraph = new ConcurrentDictionary>();
- var invertedGraph = new ConcurrentDictionary>();
+ ConcurrentDictionary> forwardGraph = new ConcurrentDictionary>();
+ ConcurrentDictionary> invertedGraph = new ConcurrentDictionary>();
// It keeps the out Degree of every vertex in the invertedGraph, which is corresponding to the in Degree of the vertex in forwardGraph.
- var inDegree = new ConcurrentDictionary();
+ ConcurrentDictionary inDegree = new ConcurrentDictionary();
// It Keeps the out degree of every vertex in the forwardGraph, which is corresponding to the in Degree of the vertex in invertedGraph.
- var outDegree = new ConcurrentDictionary();
+ ConcurrentDictionary outDegree = new ConcurrentDictionary();
compilationStartAnalysisContext.RegisterSymbolAction(
(SymbolAnalysisContext symbolAnalysisContext) =>
diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs
index 4ba27febb9..369f92457d 100644
--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs
+++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs
@@ -59,8 +59,8 @@ public sealed override void Initialize(AnalysisContext context)
}
var nonSerializedAttribute = compilation.GetOrCreateTypeByMetadataName(WellKnownTypeNames.SystemNonSerializedAttribute);
- var visitedType = new ConcurrentDictionary();
- var pointerFields = new ConcurrentDictionary();
+ ConcurrentDictionary visitedType = new ConcurrentDictionary();
+ ConcurrentDictionary pointerFields = new ConcurrentDictionary();
compilationStartAnalysisContext.RegisterSymbolAction(
(SymbolAnalysisContext symbolAnalysisContext) =>
diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/SetViewStateUserKey.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/SetViewStateUserKey.cs
index fa1856aa61..2f573ebdeb 100644
--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/SetViewStateUserKey.cs
+++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/SetViewStateUserKey.cs
@@ -48,7 +48,7 @@ public override void Initialize(AnalysisContext context)
context.RegisterCompilationStartAction(compilationStartAnalysisContext =>
{
- var compilation = compilationStartAnalysisContext.Compilation;
+ Compilation compilation = compilationStartAnalysisContext.Compilation;
var wellKnownTypeProvider = WellKnownTypeProvider.GetOrCreate(compilationStartAnalysisContext.Compilation);
if (!wellKnownTypeProvider.TryGetOrCreateTypeByMetadataName(WellKnownTypeNames.SystemWebUIPage, out var pageTypeSymbol) ||
diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseAutoValidateAntiforgeryToken.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseAutoValidateAntiforgeryToken.cs
index e5bfcb3130..cf714f591c 100644
--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseAutoValidateAntiforgeryToken.cs
+++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseAutoValidateAntiforgeryToken.cs
@@ -106,7 +106,7 @@ public override void Initialize(AnalysisContext context)
// Verify that validate anti forgery token attributes are used somewhere within this project,
// to avoid reporting false positives on projects that use an alternative approach to mitigate CSRF issues.
var usingValidateAntiForgeryAttribute = false;
- var onAuthorizationAsyncMethodSymbols = new ConcurrentDictionary();
+ ConcurrentDictionary onAuthorizationAsyncMethodSymbols = new ConcurrentDictionary();
var actionMethodSymbols = new ConcurrentDictionary<(IMethodSymbol, string), bool>();
var actionMethodNeedAddingHttpVerbAttributeSymbols = new ConcurrentDictionary();
diff --git a/src/Utilities/Compiler/Options/Unit.cs b/src/Utilities/Compiler/Options/Unit.cs
index c21b97cd65..e2b526c221 100644
--- a/src/Utilities/Compiler/Options/Unit.cs
+++ b/src/Utilities/Compiler/Options/Unit.cs
@@ -45,7 +45,9 @@ internal struct Unit : IEquatable
/// The first value to compare.
/// The second value to compare.
/// Because has a single value, this always returns true.
- [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading."), SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Parameter required for operator overloading.")]
public static bool operator ==(Unit first, Unit second) => true;
///
@@ -54,7 +56,9 @@ internal struct Unit : IEquatable
/// The first value to compare.
/// The second value to compare.
/// Because has a single value, this always returns false.
- [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading."), SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")]
+ [SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Parameter required for operator overloading.")]
public static bool operator !=(Unit first, Unit second) => false;
///
diff --git a/src/Utilities/FlowAnalysis/FlowAnalysis/Framework/DataFlow/DictionaryAnalysisData.cs b/src/Utilities/FlowAnalysis/FlowAnalysis/Framework/DataFlow/DictionaryAnalysisData.cs
index a871014cc3..dc2e7f0773 100644
--- a/src/Utilities/FlowAnalysis/FlowAnalysis/Framework/DataFlow/DictionaryAnalysisData.cs
+++ b/src/Utilities/FlowAnalysis/FlowAnalysis/Framework/DataFlow/DictionaryAnalysisData.cs
@@ -138,7 +138,9 @@ public bool Remove(KeyValuePair item)
return Remove(item.Key);
}
+#pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member because of nullability attributes. https://github.com/dotnet/roslyn/issues/42552
public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
+#pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member because of nullability attributes.
{
Debug.Assert(!IsDisposed);
return _coreAnalysisData.TryGetValue(key, out value);