Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATRO23-100] - adjust code quality rule. #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Intive.Patronage2023.ruleset
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="New Rule Set" Description=" " ToolsVersion="15.0">
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1027" Action="None" />
mateuszgiedzinski marked this conversation as resolved.
Show resolved Hide resolved
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1210" Action="None" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1217" Action="None" />
<Rule Id="SA1311" Action="None" />
<Rule Id="SA1623" Action="None" />
Expand Down
14 changes: 9 additions & 5 deletions app.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PropertyGroup>

<!-- Enable raising errors due not clean source code -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<!-- Documentation file destitnation -->
<DocumentationFile>$(TargetDir)/bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>

<!-- Code analysis ruleset configuration -->
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)Intive.Patronage2023.ruleset</CodeAnalysisRuleset>

</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>
</Project>
38 changes: 19 additions & 19 deletions src/modules/example/api/ExampleModule.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
namespace Intive.Patronage2023.Modules.Example.Api;
namespace Intive.Patronage2023.Modules.Example.Api;

/// <summary>
/// Example module.
/// </summary>
public static class ExampleModule
{
/// <summary>
/// Add module services.
/// </summary>
/// <param name="services">IServiceCollection.</param>
/// <returns>Updated IServiceCollection.</returns>
public static IServiceCollection AddExampleModule(this IServiceCollection services)
{
return services;
}
/// <summary>
/// Add module services.
/// </summary>
/// <param name="services">IServiceCollection.</param>
/// <returns>Updated IServiceCollection.</returns>
public static IServiceCollection AddExampleModule(this IServiceCollection services)
{
return services;
}

/// <summary>
/// Customizes app building process.
/// </summary>
/// <param name="app">IApplicationBuilder.</param>
/// <returns>Updated IApplicationBuilder.</returns>
public static IApplicationBuilder UseExampleModule(this IApplicationBuilder app)
{
return app;
}
/// <summary>
/// Customizes app building process.
/// </summary>
/// <param name="app">IApplicationBuilder.</param>
/// <returns>Updated IApplicationBuilder.</returns>
public static IApplicationBuilder UseExampleModule(this IApplicationBuilder app)
{
return app;
}
}
13 changes: 13 additions & 0 deletions stylecop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"companyName": "Intive Gmbh",
"copyrightText": "Copyright (c) {companyName}. All Rights Reserved.",
"xmlHeader": false,
},
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
}
}
}