Skip to content

Commit

Permalink
Apply StyleCop.Analyzers.ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
hardywood-k committed Nov 25, 2018
1 parent 5b7fd16 commit f5893db
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Libplanet.Tests/Libplanet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="xunit" Version="2.3.1" />
Expand All @@ -15,4 +19,8 @@
<ItemGroup>
<ProjectReference Include="..\Libplanet\Libplanet.csproj" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\stylecop.json" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions Libplanet/Libplanet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BouncyCastle.NetCore" Version="1.8.3" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\stylecop.json" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions StyleCop.Analyzers.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Rules for Libplanet" Description="Code analysis rules for Libplanet.csproj." ToolsVersion="10.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1652" Action="None" />
<Rule Id="SA1309" Action="None" />
</Rules>
</RuleSet>
8 changes: 8 additions & 0 deletions stylecop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
}
}
}

0 comments on commit f5893db

Please sign in to comment.