Skip to content

Commit 019ade5

Browse files
committed
Merge pull request #1581 from oatkins/stylecopsettings-item-name
2 parents adab719 + 5e4d166 commit 019ade5

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@
405405
<None Include="..\StyleCop.Analyzers.ruleset">
406406
<Link>StyleCop.Analyzers.ruleset</Link>
407407
</None>
408+
<None Include="build\StyleCop.Analyzers.targets" />
408409
<None Include="packages.config" />
409410
<NuGetManifest Include="StyleCop.Analyzers.nuspec">
410411
<SubType>Designer</SubType>

StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.nuspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<file src="tools\install.ps1" target="tools\" />
2727
<file src="tools\uninstall.ps1" target="tools\" />
2828

29+
<!-- MSBuild imports -->
30+
<file src="build\StyleCop.Analyzers.targets" target="build\" />
31+
2932
<!-- Source code -->
3033
<file src="**\*.cs" exclude="obj\**\*.cs" target="src"/>
3134

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<Target Name="InjectStyleCopSettings"
5+
BeforeTargets="CoreCompile">
6+
<ItemGroup>
7+
<StyleCopSettings Include="@(None)"
8+
Condition="'%(Filename)%(Extension)' == 'stylecop.json'"/>
9+
<AdditionalFiles Include="%(StyleCopSettings.Identity)" />
10+
</ItemGroup>
11+
</Target>
12+
13+
</Project>

0 commit comments

Comments
 (0)