Skip to content

Commit 77e940d

Browse files
authored
Add File Headers Configuration (#33)
Add file headers configuration
1 parent 97466df commit 77e940d

File tree

7 files changed

+35
-164
lines changed

7 files changed

+35
-164
lines changed

.editorconfig

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 1.5.0 (Using https://semver.org/)
2-
# Updated: 2020-03-09
1+
# Version: 1.6.0 (Using https://semver.org/)
2+
# Updated: 2020-07-28
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -63,6 +63,18 @@ end_of_line = lf
6363
[Makefile]
6464
indent_style = tab
6565

66+
##########################################
67+
# File Header (Uncomment to support file headers)
68+
# https://docs.microsoft.com/en-us/visualstudio/ide/reference/add-file-header
69+
##########################################
70+
71+
# [*.{cs,csx,cake,vb,vbx}]
72+
# file_header_template = <copyright file="{fileName}" company="PROJECT-AUTHOR">\nCopyright (©) PROJECT-AUTHOR. All Rights Reserved\n</copyright>
73+
74+
# SA1636: File header copyright text should match
75+
# Justification: .editorconfig supports file headers, so specifying a stylecop.json file with the file header is not needed.
76+
# dotnet_diagnostic.SA1636.severity = none
77+
6678
##########################################
6779
# .NET Language Conventions
6880
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,12 @@
1-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<PropertyGroup>
3-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5-
<ProjectGuid>{29BDC663-4524-4258-8621-980288CC6E9F}</ProjectGuid>
6-
<OutputType>Library</OutputType>
7-
<NoStandardLibraries>false</NoStandardLibraries>
8-
<AssemblyName>ClassLibrary</AssemblyName>
9-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
10-
<FileAlignment>512</FileAlignment>
11-
<TargetFrameworkProfile />
12-
</PropertyGroup>
13-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14-
<DebugSymbols>true</DebugSymbols>
15-
<DebugType>full</DebugType>
16-
<Optimize>false</Optimize>
17-
<OutputPath>bin\Debug\</OutputPath>
18-
<DefineConstants>DEBUG;TRACE</DefineConstants>
19-
<ErrorReport>prompt</ErrorReport>
20-
<WarningLevel>4</WarningLevel>
21-
<Prefer32Bit>false</Prefer32Bit>
22-
<LangVersion>7.2</LangVersion>
23-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
24-
<CodeAnalysisRuleSet>CSharpSamples.ruleset</CodeAnalysisRuleSet>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
<Prefer32Bit>false</Prefer32Bit>
34-
<CodeAnalysisRuleSet>CSharpSamples.ruleset</CodeAnalysisRuleSet>
35-
</PropertyGroup>
36-
<PropertyGroup>
37-
<RootNamespace>EditorConfigCSharpSamples</RootNamespace>
38-
</PropertyGroup>
39-
<ItemGroup>
40-
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System" />
42-
<Reference Include="System.Core" />
43-
<Reference Include="System.Data" />
44-
<Reference Include="System.Data.DataSetExtensions" />
45-
<Reference Include="System.Xml" />
46-
<Reference Include="System.Xml.Linq" />
47-
</ItemGroup>
48-
<ItemGroup>
49-
<None Include="CSharpSamples.ruleset" />
50-
<None Include="packages.config" />
51-
<AdditionalFiles Include="stylecop.json" />
52-
</ItemGroup>
53-
<ItemGroup>
54-
<Analyzer Include="packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
55-
<Analyzer Include="packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
56-
</ItemGroup>
57-
<ItemGroup>
58-
<Compile Include="FieldExamples.cs" />
59-
</ItemGroup>
60-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
61-
<ProjectExtensions>
62-
<VisualStudio AllowExistingFolder="true" />
63-
</ProjectExtensions>
64-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup Label="Build">
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<LangVersion>latest</LangVersion>
6+
</PropertyGroup>
7+
8+
<ItemGroup Label="Package References">
9+
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />
10+
</ItemGroup>
11+
12+
</Project>

Samples/CSharp/CSharpSamples.ruleset

Lines changed: 0 additions & 79 deletions
This file was deleted.

Samples/CSharp/CSharpSamples.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 15
3-
VisualStudioVersion = 15.0.28307.539
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.30309.148
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpSamples", "CSharpSamples.csproj", "{29BDC663-4524-4258-8621-980288CC6E9F}"
66
EndProject
@@ -21,4 +21,4 @@ Global
2121
GlobalSection(ExtensibilityGlobals) = postSolution
2222
SolutionGuid = {0F1033D5-0C95-44D7-ADB8-8D536F772355}
2323
EndGlobalSection
24-
EndGlobal
24+
EndGlobal

Samples/CSharp/FieldsExamples.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
// Copyright (c) 2019 Henry Gabryjelski
2-
namespace My
1+
// <copyright file="FieldsExamples.cs" company="PROJECT-AUTHOR">
2+
// Copyright (©) PROJECT-AUTHOR. All Rights Reserved
3+
// </copyright>
4+
5+
namespace CSharpSamples
36
{
47
internal class FieldsExamples
58
{
@@ -238,4 +241,4 @@ private void Foo() // To get around warnings telling you fields must be readonly
238241
this.PascalCasePrivateField = 1;
239242
}
240243
}
241-
}
244+
}

Samples/CSharp/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

Samples/CSharp/stylecop.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)