Ignore C26812 warning for C style enums.
Sean Hall committed
Nov 16, 2020 at 16:47 UTC
7a942746bc535d319bdfa7f17025347ac6913ba2
3 files changed
+13
-1
src/Cpp.Build.props
+4
@@ -16,6 +16,10 @@
16
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
17
</PropertyGroup>
18
19
+ <PropertyGroup>
20
+ <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
21
+ </PropertyGroup>
22
+
23
<ItemDefinitionGroup>
24
<ClCompile>
25
<DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
src/CustomizedNativeRecommendedRules.ruleset
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<RuleSet Name="Customized Microsoft Native Recommended Rules" Description="Microsoft Native Recommended Rules, -C26812" ToolsVersion="16.0">
3
+ <Include Path="nativerecommendedrules.ruleset" Action="Default" />
4
+ <Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
5
+ <!-- We need C style enums since we support BAs written in C -->
6
+ <Rule Id="C26812" Action="None" />
7
+ </Rules>
8
+</RuleSet>
\ No newline at end of file
src/engine/engine.vcxproj
+1
-1
@@ -175,4 +175,4 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
175
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props'))" />
176
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
177
</Target>
178
-</Project>
178
+</Project>
\ No newline at end of file