Skip to content

Commit

Permalink
Mitigated .NET 9 Visual Studio code analysis misbehavior with additio…
Browse files Browse the repository at this point in the history
…nal editorconfig settings.
  • Loading branch information
RyanLamansky committed Nov 17, 2024
1 parent 2466df3 commit 87614b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[*.cs]

# IDE0008: Use explicit type
csharp_style_var_elsewhere = true
csharp_prefer_braces = when_multiline
csharp_style_namespace_declarations=file_scoped:warning
csharp_style_var_when_type_is_apparent = true
csharp_style_var_for_built_in_types = true
csharp_style_var_elsewhere = true

# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = none
5 changes: 0 additions & 5 deletions WebAssembly/WebAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
<!--
Starting in .NET 9, this causes a huge amount of IDE errors in Visual Studio for some reason.
<AnalysisMode>Minimum</AnalysisMode>
-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -44,8 +41,6 @@

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<!-- Even though this is broken in .NET 9 + VS 2022 for this project, it builds fine so we should still run it. -->
<AnalysisMode>Minimum</AnalysisMode>
</PropertyGroup>

</Project>

0 comments on commit 87614b6

Please sign in to comment.