From dc64d34a3cbd485c03ed8fe7ac6deb85b210e804 Mon Sep 17 00:00:00 2001 From: Zev Spitz Date: Thu, 20 Jan 2022 10:55:46 +0200 Subject: [PATCH] Detect Option Strict for VB projects --- 00_Utilities/DotnetUtils/DotnetUtils/Program.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs index 560a7207..6e51d4f1 100644 --- a/00_Utilities/DotnetUtils/DotnetUtils/Program.cs +++ b/00_Utilities/DotnetUtils/DotnetUtils/Program.cs @@ -232,13 +232,15 @@ void printProjectWarnings(PortInfo info) { nullable, implicitUsing, rootNamespace, - langVersion + langVersion, + optionStrict ) = ( getValue(parent, "TargetFramework", "TargetFrameworks"), getValue(parent, "Nullable"), getValue(parent, "ImplicitUsings"), getValue(parent, "RootNamespace"), - getValue(parent, "LangVersion") + getValue(parent, "LangVersion"), + getValue(parent, "OptionStrict") ); if (framework != "net6.0") { @@ -267,6 +269,9 @@ void printProjectWarnings(PortInfo info) { if (langVersion != "16.9") { warnings.Add($"LangVersion: {langVersion}"); } + if (optionStrict != "On") { + warnings.Add($"OptionStrict: {optionStrict}"); + } } if (warnings.Any()) {