@joebigelow / wix-1 / commits / fa97c540

Ignore C26812 warning for C style enums.

Sean Hall committed Dec 2, 2020 at 20:19 UTC fa97c540035df80723a60e870f90bbeeab02bb3b
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