Skip to content

Commit 4c4883e

Browse files
authored
Standardizes additional file types in .editorconfig (#1266)
* Updates .gitignore to exclude test results * Adds .editorconfig for xml, csproj, and props files Formats xml, csproj, and props files * Hides stylecop.json from Solution Explorer projects
1 parent 6d9d032 commit 4c4883e

File tree

7 files changed

+56
-51
lines changed

7 files changed

+56
-51
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ indent_size = 4
99
tab_width = 4
1010
end_of_line = crlf
1111

12+
[*.{xml,csproj,props}]
13+
14+
indent_size = 2
15+
tab_width = 2
16+
1217
[*.cs]
1318

1419
#### Sonar rules ####

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test/**/bin/**
55
test/**/obj/**
66

77
# MSTest test Results
8-
src/TestResults/
8+
TestResults/
99

1010
# User-specific files
1111
*.suo

Directory.Build.props

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
<Project>
2-
<Import Project="$(MSBuildThisFileFullPath).user" Condition="Exists('$(MSBuildThisFileFullPath).user')" />
3-
4-
<!--
2+
<Import Project="$(MSBuildThisFileFullPath).user" Condition="Exists('$(MSBuildThisFileFullPath).user')" />
3+
4+
<!--
55
Assembly Info properties that apply to all projects/assemblies.
66
-->
7-
<PropertyGroup>
8-
<SignAssembly>true</SignAssembly>
9-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Renci.SshNet.snk</AssemblyOriginatorKeyFile>
10-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<LangVersion>latest</LangVersion>
12-
<WarningLevel>9999</WarningLevel>
13-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
14-
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
15-
</PropertyGroup>
7+
<PropertyGroup>
8+
<SignAssembly>true</SignAssembly>
9+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Renci.SshNet.snk</AssemblyOriginatorKeyFile>
10+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11+
<LangVersion>latest</LangVersion>
12+
<WarningLevel>9999</WarningLevel>
13+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
14+
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
15+
</PropertyGroup>
1616

17-
<!--
17+
<!--
1818
Code analysis properties.
1919
-->
20-
<PropertyGroup>
21-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
22-
<AnalysisLevel>preview-All</AnalysisLevel>
23-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
24-
</PropertyGroup>
20+
<PropertyGroup>
21+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
22+
<AnalysisLevel>preview-All</AnalysisLevel>
23+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
24+
</PropertyGroup>
2525

26-
<!--
26+
<!--
2727
Add the stylecop config to each project.
2828
-->
29-
<ItemGroup>
30-
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
31-
</ItemGroup>
29+
<ItemGroup>
30+
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" Visible="false" />
31+
</ItemGroup>
3232

33-
<!--
33+
<!--
3434
Use fixed version of analyzers.
3535
-->
36-
<ItemGroup>
37-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview1.23165.1" PrivateAssets="all" />
38-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" />
39-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.103" PrivateAssets="all" />
40-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982" PrivateAssets="all" />
41-
</ItemGroup>
36+
<ItemGroup>
37+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview1.23165.1" PrivateAssets="all" />
38+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" />
39+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.103" PrivateAssets="all" />
40+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982" PrivateAssets="all" />
41+
</ItemGroup>
4242
</Project>

src/Renci.SshNet/Renci.SshNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
44
<AssemblyName>Renci.SshNet</AssemblyName>
5-
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">

test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
2828
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
2929
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
30-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
31-
<PrivateAssets>all</PrivateAssets>
30+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
31+
<PrivateAssets>all</PrivateAssets>
3232
</PackageReference>
3333
<PackageReference Include="coverlet.collector" Version="6.0.0">
34-
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35-
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
<PrivateAssets>all</PrivateAssets>
3636
</PackageReference>
3737
</ItemGroup>
3838

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
4-
<ImplicitUsings>enable</ImplicitUsings>
5-
<Nullable>enable</Nullable>
6-
<NoWarn>$(NoWarn);SYSLIB0021;SYSLIB1045</NoWarn>
7-
</PropertyGroup>
8-
<ItemGroup>
9-
<Compile Remove="Properties\**" />
10-
<EmbeddedResource Remove="Properties\**" />
11-
<None Remove="Properties\**" />
12-
</ItemGroup>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
<NoWarn>$(NoWarn);SYSLIB0021;SYSLIB1045</NoWarn>
7+
</PropertyGroup>
8+
<ItemGroup>
9+
<Compile Remove="Properties\**" />
10+
<EmbeddedResource Remove="Properties\**" />
11+
<None Remove="Properties\**" />
12+
</ItemGroup>
1313
</Project>

test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<EmbeddedResource Include="..\Data\*" LinkBase="Data" />
7+
<EmbeddedResource Include="..\Data\*" LinkBase="Data" />
88
</ItemGroup>
99

1010
<ItemGroup>
@@ -16,12 +16,12 @@
1616
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
1717
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
1818
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
19-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
20-
<PrivateAssets>all</PrivateAssets>
19+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
20+
<PrivateAssets>all</PrivateAssets>
2121
</PackageReference>
2222
<PackageReference Include="coverlet.collector" Version="6.0.0">
23-
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24+
<PrivateAssets>all</PrivateAssets>
2525
</PackageReference>
2626

2727
</ItemGroup>

0 commit comments

Comments
 (0)