Ignore C26812 warning for C style enums.
Sean Hall committed
Dec 3, 2020 at 10:53 UTC
7c8acb14937d25177dcb0d5e784e46e71bad8b57
2 files changed
+16
src/Cpp.Build.props
+8
@@ -6,12 +6,20 @@
6
<Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
<IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8
<OutDir>$(OutputPath)$(Platform)\</OutDir>
9
+
10
+ <!-- NBGV properties -->
11
+ <AssemblyCompany>$(Company)</AssemblyCompany>
12
+ <AssemblyCopyright>$(Copyright)</AssemblyCopyright>
13
</PropertyGroup>
14
15
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
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