diff --git a/.editorconfig b/.editorconfig index a3f5ca8f69e3..8afd0dd3dd1a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -287,21 +287,25 @@ dotnet_diagnostic.IDE0200.severity = none # Remove redundant nullable directive dotnet_diagnostic.IDE0240.severity = warning # MSBuildTask0001-0005 (Microsoft.Build.TaskAuthoring.Analyzer). MSBuildTask0001 is Error severity by -# default; the rest are warnings. All are downgraded to 'suggestion' here for report-only onboarding while -# task migration to the multithreaded model (IMultiThreadableTask / TaskEnvironment) is pending. At -# suggestion level they are info diagnostics, so they never fail the build (not even under Arcade's -# MSBuild-engine warn-as-error) without needing any WarningsNotAsErrors exemptions. +# default; the rest are warnings. These were all initially downgraded to 'suggestion' for report-only +# onboarding while task migration to the multithreaded model (IMultiThreadableTask / TaskEnvironment) is +# pending. At suggestion level they are info diagnostics, so they never fail the build (not even under +# Arcade's MSBuild-engine warn-as-error) without needing any WarningsNotAsErrors exemptions. # -# Incremental re-enablement: a follow-up PR can raise a single rule globally (edit a line below to -# 'warning'/'error' -- a "category" at a time), or raise severity for one task class by adding an -# .editorconfig in that task's source directory that overrides these codes. +# Incremental re-enablement (ratcheting): MSBuildTask0004 ('API may cause issues in multithreaded tasks') +# is enabled at 'error' below. Its concerns (Assembly.Load* / Activator.CreateInstance* / AppDomain.* in a +# shared task host) do NOT depend on the IMultiThreadableTask / TaskEnvironment migration, so it can be +# enforced today, and the codebase already has zero violations. MSBuildTask0001/0002/0003/0005 remain at +# 'suggestion' pending that migration (0002/0003 need TaskEnvironment; 0005 is transitive on the others). +# A follow-up PR can raise a single rule globally (edit a line below), or raise severity for one task class +# by adding an .editorconfig in that task's source directory that overrides these codes. # # NOTE: src/StaticWebAssetsSdk/.editorconfig sets `root = true`, so it does not inherit these lines and # carries its own copy of this block. Keep the two in sync. dotnet_diagnostic.MSBuildTask0001.severity = suggestion dotnet_diagnostic.MSBuildTask0002.severity = suggestion dotnet_diagnostic.MSBuildTask0003.severity = suggestion -dotnet_diagnostic.MSBuildTask0004.severity = suggestion +dotnet_diagnostic.MSBuildTask0004.severity = error dotnet_diagnostic.MSBuildTask0005.severity = suggestion # Additional rules for template engine source code diff --git a/src/StaticWebAssetsSdk/.editorconfig b/src/StaticWebAssetsSdk/.editorconfig index 97131d5fdf35..1e99d37ecc44 100644 --- a/src/StaticWebAssetsSdk/.editorconfig +++ b/src/StaticWebAssetsSdk/.editorconfig @@ -94,15 +94,18 @@ charset = utf-8-bom [*.{cs,vb}] -# MSBuildTask0001-0005 (Microsoft.Build.TaskAuthoring.Analyzer) downgraded to 'suggestion' for report-only -# onboarding while task migration to the multithreaded model (IMultiThreadableTask / TaskEnvironment) is -# pending. This must be duplicated from the repo-root .editorconfig because this file sets `root = true`, -# which severs inheritance from the root. Raise these to 'warning'/'error' (here or in a more specific -# nested .editorconfig) as task classes are migrated. +# MSBuildTask0001-0005 (Microsoft.Build.TaskAuthoring.Analyzer) were initially downgraded to 'suggestion' +# for report-only onboarding while task migration to the multithreaded model (IMultiThreadableTask / +# TaskEnvironment) is pending. This must be duplicated from the repo-root .editorconfig because this file +# sets `root = true`, which severs inheritance from the root. MSBuildTask0004 ('API may cause issues in +# multithreaded tasks') is enabled at 'error' below: its concerns do NOT depend on the TaskEnvironment +# migration, so it can be enforced today, and the codebase already has zero violations. The remaining rules +# stay at 'suggestion' pending that migration. Raise these (here or in a more specific nested .editorconfig) +# as task classes are migrated. Keep this block in sync with the repo-root .editorconfig. dotnet_diagnostic.MSBuildTask0001.severity = suggestion dotnet_diagnostic.MSBuildTask0002.severity = suggestion dotnet_diagnostic.MSBuildTask0003.severity = suggestion -dotnet_diagnostic.MSBuildTask0004.severity = suggestion +dotnet_diagnostic.MSBuildTask0004.severity = error dotnet_diagnostic.MSBuildTask0005.severity = suggestion # SYSLIB1054: Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time