Skip to content

Commit

Permalink
Move NoWarn to its own property group
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Oct 15, 2023
1 parent c03292c commit e01b913
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion sources/ClangSharp.Interop/ClangSharp.Interop.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<!-- CA1003: Use generic event handler instances -->
<!-- CA1008: Enums should have zero value -->
Expand All @@ -21,7 +25,6 @@
<!-- CA1815: Override equals and operator equals on value types -->
<!-- CA2225: Operator overloads have named alternates -->
<NoWarn>$(NoWarn);CA1003;CA1008;CA1027;CA1034;CA1051;CA1069;CA1305;CA1508;CA1707;CA1708;CA1710;CA1711;CA1712;CA1720;CA1721;CA1724;CA1815;CA2225</NoWarn>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- CA1303: Do not pass literals as localized parameters -->
<NoWarn>$(NoWarn);CA1303</NoWarn>
<RootNamespace>ClangSharp</RootNamespace>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<!-- CA1303: Do not pass literals as localized parameters -->
<NoWarn>$(NoWarn);CA1303</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ClangSharp\ClangSharp.csproj" />
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion sources/ClangSharp/ClangSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<!-- CA1034: Nested types should not be visible -->
<!-- CA1040: Avoid empty interfaces -->
<!-- CA1720: Identifiers should not contain type names -->
<NoWarn>$(NoWarn);CA1034;CA1040;CA1720</NoWarn>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>ClangSharp.UnitTests</RootNamespace>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<!-- CA1707: Identifiers should not contain underscores -->
<!-- CA1711: Identifiers should not have incorrect suffix -->
<NoWarn>$(NoWarn);CA1707;CA1711</NoWarn>
<RootNamespace>ClangSharp.UnitTests</RootNamespace>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion tests/ClangSharp.UnitTests/ClangSharp.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<!-- CA1707: Identifiers should not contain underscores -->
<NoWarn>$(NoWarn);CA1707</NoWarn>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit e01b913

Please sign in to comment.