Skip to content
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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.3.0",
"commands": [
"csharpier"
],
"rollForward": false
}
}
}
44 changes: 43 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
[*.cs]
[*.cs]

# IDE0028: Simplify collection initialization
dotnet_diagnostic.IDE0028.severity = none

# Formatting follows CSharpier; `dotnet csharpier check` enforces it in CI. These keys keep the IDE
# formatter consistent with it, and IDE0055 is off because some layouts, such as a multi-line
# constructor initializer before an empty body, cannot be expressed to it.
dotnet_diagnostic.IDE0055.severity = none
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,21 @@ jobs:
with:
dotnet-version: |
10.0.x
11.0.100-preview.7.26381.103
11.0.100-rc.1.26425.128

- name: Restore dependencies
run: dotnet restore KoFi.Client.slnx

- name: Check formatting
run: |
dotnet tool restore
dotnet csharpier check .

- name: Build solution
run: dotnet build KoFi.Client.slnx --configuration Release --no-restore

- name: Run unit tests
run: dotnet test tests/KoFi.Client.Tests/KoFi.Client.Tests.csproj --configuration Release --no-build --verbosity normal -- --coverage --coverage-settings coverage.settings.xml --coverage-output-format cobertura --coverage-output coverage.cobertura.xml
run: dotnet test --project ${{ github.workspace }}/tests/KoFi.Client.Tests/KoFi.Client.Tests.csproj --configuration Release --no-build --verbosity normal -- --coverage --coverage-settings coverage.settings.xml --coverage-output-format cobertura --coverage-output coverage.cobertura.xml


- name: Summarize coverage
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<RepositoryUrl>https://github.com/Agash/KoFi.Client</RepositoryUrl>
<PackageTags>ko-fi;kofi;donations;creator-economy;webhooks;api-client;dotnet;csharp;aot;nativeaot</PackageTags>
<PackageProjectUrl>https://github.com/Agash/KoFi.Client</PackageProjectUrl>
<GenerateDocumentationFile Condition="'$(IsPackable)' == 'true'">true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition="'$(IsPackable)' == 'true'"
>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

</Project>
8 changes: 7 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<Project>
<!-- Runs after individual .csproj files, so $(IsPackable) is already set. -->
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" Link="README.md" Visible="false" />
<None
Include="$(MSBuildThisFileDirectory)README.md"
Pack="true"
PackagePath="\"
Link="README.md"
Visible="false"
/>
<None Include="$(MSBuildThisFileDirectory)LICENSE" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "11.0.100-preview.7.26381.103",
"version": "11.0.100-rc.1.26425.128",
"allowPrerelease": true,
"rollForward": "latestPreview"
},
Expand Down
50 changes: 24 additions & 26 deletions samples/KoFi.Client.Sample/KoFi.Client.Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<NoWarn>$(NoWarn);CA1305</NoWarn>
<UserSecretsId>KoFi.Client.Sample</UserSecretsId>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UserSecretsId>KoFi.Client.Sample</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\KoFi.Client.DependencyInjection\KoFi.Client.DependencyInjection.csproj" />
<ProjectReference Include="..\..\src\KoFi.Client\KoFi.Client.csproj" />
<ProjectReference Include="..\..\src\KoFi.Client.AspNetCore\KoFi.Client.AspNetCore.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\KoFi.Client.DependencyInjection\KoFi.Client.DependencyInjection.csproj" />
<ProjectReference Include="..\..\src\KoFi.Client\KoFi.Client.csproj" />
<ProjectReference Include="..\..\src\KoFi.Client.AspNetCore\KoFi.Client.AspNetCore.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="DevTunnels.Client" Version="1.1.0" />
<PackageReference Include="Spectre.Console" Version="0.57.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevTunnels.Client" Version="1.1.0" />
<PackageReference Include="Spectre.Console" Version="0.57.2" />
</ItemGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
Loading
Loading