mirror of
https://github.com/jcreek/Creek.FileRepository.git
synced 2026-07-12 18:33:43 +00:00
feat(*): Add stylecop for better linting
This commit is contained in:
@@ -4,4 +4,19 @@
|
|||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="GlobalSuppressions.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AdditionalFiles Include="GlobalSuppressions.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// This file is used by Code Analysis to maintain SuppressMessage
|
||||||
|
// attributes that are applied to this project.
|
||||||
|
// Project-level suppressions either have no target or are given
|
||||||
|
// a specific target and scoped to a namespace, type, member, etc.
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File should have header", Justification = "Not something we need at this stage - jcreek")]
|
||||||
|
[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1208:System using directives should be placed before other using directives", Justification = "I'd prefer to have the using directives in alphabetical order - jcreek")]
|
||||||
|
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1124:Do not use regions", Justification = "They are really useful, especially when used appropriately - jcreek")]
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
// ACTION REQUIRED: This file was automatically added to your project, but it
|
||||||
|
// will not take effect until additional steps are taken to enable it. See the
|
||||||
|
// following page for additional information:
|
||||||
|
//
|
||||||
|
// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md
|
||||||
|
"": null,
|
||||||
|
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||||
|
"settings": {
|
||||||
|
"documentationRules": {
|
||||||
|
"companyName": "Creek",
|
||||||
|
"documentationCulture": "en-GB",
|
||||||
|
"documentInterfaces": true,
|
||||||
|
"documentExposedElements": true,
|
||||||
|
"documentInternalElements": true,
|
||||||
|
"documentPrivateElements": true,
|
||||||
|
"documentPrivateFields": false,
|
||||||
|
"headerDecoration": "-----------------------------------------------------------------------",
|
||||||
|
"xmlHeader": true
|
||||||
|
},
|
||||||
|
"layoutRules": {
|
||||||
|
"allowConsecutiveUsings": true,
|
||||||
|
"newlineAtEndOfFile": "require"
|
||||||
|
},
|
||||||
|
"maintainabilityRules": {
|
||||||
|
"topLevelTypes": [
|
||||||
|
"class",
|
||||||
|
"interface"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"namingRules": {
|
||||||
|
"allowCommonHungarianPrefixes": true,
|
||||||
|
"includeInferredTupleElementNames": true,
|
||||||
|
"tupleElementNameCasing": "PascalCase"
|
||||||
|
},
|
||||||
|
"orderingRules": {
|
||||||
|
"elementOrder": [
|
||||||
|
"kind",
|
||||||
|
"constant",
|
||||||
|
"accessibility",
|
||||||
|
"static",
|
||||||
|
"readonly"
|
||||||
|
],
|
||||||
|
"blankLinesBetweenUsingGroups": "omit",
|
||||||
|
"usingDirectivesPlacement": "outsideNamespace",
|
||||||
|
"systemUsingDirectivesFirst": true
|
||||||
|
},
|
||||||
|
"readabilityRules": {
|
||||||
|
"allowBuiltInTypeAliases": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user