Skip to content

Commit

Permalink
Add File Headers Configuration (#33)
Browse files Browse the repository at this point in the history
Add file headers configuration
  • Loading branch information
RehanSaeed authored Jul 28, 2020
1 parent 97466df commit 77e940d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 164 deletions.
16 changes: 14 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version: 1.5.0 (Using https://semver.org/)
# Updated: 2020-03-09
# Version: 1.6.0 (Using https://semver.org/)
# Updated: 2020-07-28
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
# See http://EditorConfig.org for more information about .editorconfig files.
Expand Down Expand Up @@ -63,6 +63,18 @@ end_of_line = lf
[Makefile]
indent_style = tab

##########################################
# File Header (Uncomment to support file headers)
# https://docs.microsoft.com/en-us/visualstudio/ide/reference/add-file-header
##########################################

# [*.{cs,csx,cake,vb,vbx}]
# file_header_template = <copyright file="{fileName}" company="PROJECT-AUTHOR">\nCopyright (©) PROJECT-AUTHOR. All Rights Reserved\n</copyright>

# SA1636: File header copyright text should match
# Justification: .editorconfig supports file headers, so specifying a stylecop.json file with the file header is not needed.
# dotnet_diagnostic.SA1636.severity = none

##########################################
# .NET Language Conventions
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
Expand Down
76 changes: 12 additions & 64 deletions Samples/CSharp/CSharpSamples.csproj
Original file line number Diff line number Diff line change
@@ -1,64 +1,12 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{29BDC663-4524-4258-8621-980288CC6E9F}</ProjectGuid>
<OutputType>Library</OutputType>
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>ClassLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>7.2</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>CSharpSamples.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>CSharpSamples.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>EditorConfigCSharpSamples</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<None Include="CSharpSamples.ruleset" />
<None Include="packages.config" />
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="FieldExamples.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
<ProjectExtensions>
<VisualStudio AllowExistingFolder="true" />
</ProjectExtensions>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Build">
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup Label="Package References">
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Version="1.1.118" />
</ItemGroup>

</Project>
79 changes: 0 additions & 79 deletions Samples/CSharp/CSharpSamples.ruleset

This file was deleted.

6 changes: 3 additions & 3 deletions Samples/CSharp/CSharpSamples.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.539
# Visual Studio Version 16
VisualStudioVersion = 16.0.30309.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpSamples", "CSharpSamples.csproj", "{29BDC663-4524-4258-8621-980288CC6E9F}"
EndProject
Expand All @@ -21,4 +21,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0F1033D5-0C95-44D7-ADB8-8D536F772355}
EndGlobalSection
EndGlobal
EndGlobal
9 changes: 6 additions & 3 deletions Samples/CSharp/FieldsExamples.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Copyright (c) 2019 Henry Gabryjelski
namespace My
// <copyright file="FieldsExamples.cs" company="PROJECT-AUTHOR">
// Copyright (©) PROJECT-AUTHOR. All Rights Reserved
// </copyright>

namespace CSharpSamples
{
internal class FieldsExamples
{
Expand Down Expand Up @@ -238,4 +241,4 @@ private void Foo() // To get around warnings telling you fields must be readonly
this.PascalCasePrivateField = 1;
}
}
}
}
4 changes: 0 additions & 4 deletions Samples/CSharp/packages.config

This file was deleted.

9 changes: 0 additions & 9 deletions Samples/CSharp/stylecop.json

This file was deleted.

0 comments on commit 77e940d

Please sign in to comment.