Skip to content

Commit a00f1f9

Browse files
committed
Code cleanup
1 parent 89275d9 commit a00f1f9

23 files changed

+279
-181
lines changed

.editorconfig

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ csharp_style_conditional_delegate_call = true:warning
104104

105105
# Modifier preferences
106106
csharp_prefer_static_local_function = true:warning
107-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
107+
csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async
108108
csharp_style_prefer_readonly_struct = true:warning
109109
csharp_style_prefer_readonly_struct_member = true:suggestion
110110

@@ -212,30 +212,30 @@ dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
212212

213213
dotnet_naming_symbols.interface.applicable_kinds = interface
214214
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
215-
dotnet_naming_symbols.interface.required_modifiers =
215+
dotnet_naming_symbols.interface.required_modifiers =
216216

217217
dotnet_naming_symbols.static_field.applicable_kinds = field
218218
dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
219219
dotnet_naming_symbols.static_field.required_modifiers = static
220220

221221
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
222222
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
223-
dotnet_naming_symbols.types.required_modifiers =
223+
dotnet_naming_symbols.types.required_modifiers =
224224

225225
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
226226
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
227-
dotnet_naming_symbols.non_field_members.required_modifiers =
227+
dotnet_naming_symbols.non_field_members.required_modifiers =
228228

229229
# Naming styles
230230

231-
dotnet_naming_style.pascal_case.required_prefix =
232-
dotnet_naming_style.pascal_case.required_suffix =
233-
dotnet_naming_style.pascal_case.word_separator =
231+
dotnet_naming_style.pascal_case.required_prefix =
232+
dotnet_naming_style.pascal_case.required_suffix =
233+
dotnet_naming_style.pascal_case.word_separator =
234234
dotnet_naming_style.pascal_case.capitalization = pascal_case
235235

236236
dotnet_naming_style.begins_with_i.required_prefix = I
237-
dotnet_naming_style.begins_with_i.required_suffix =
238-
dotnet_naming_style.begins_with_i.word_separator =
237+
dotnet_naming_style.begins_with_i.required_suffix =
238+
dotnet_naming_style.begins_with_i.word_separator =
239239
dotnet_naming_style.begins_with_i.capitalization = pascal_case
240240

241241
[*.{cs,vb}]
@@ -273,4 +273,4 @@ dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
273273
dotnet_style_qualification_for_field = false:silent
274274
dotnet_style_qualification_for_property = false:error
275275
dotnet_style_qualification_for_method = false:error
276-
dotnet_style_qualification_for_event = false:error
276+
dotnet_style_qualification_for_event = false:error

.github/workflows/dotnet.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,56 @@ jobs:
1212
name: Build and analyze
1313
runs-on: windows-latest
1414
steps:
15-
- name: Set up JDK
16-
uses: actions/setup-java@v4.4.0
17-
with:
18-
java-version: 17
19-
distribution: 'zulu'
20-
21-
- name: Checkout
22-
uses: actions/checkout@v4.2.1
23-
with:
24-
fetch-depth: 0
15+
- name: Set up JDK
16+
uses: actions/setup-java@v4.4.0
17+
with:
18+
java-version: 17
19+
distribution: 'zulu'
2520

26-
- name: Cache SonarCloud packages
27-
uses: actions/cache@v4.2.3
28-
with:
29-
path: ~\sonar\cache
30-
key: ${{ runner.os }}-sonar
31-
restore-keys: ${{ runner.os }}-sonar
21+
- name: Checkout
22+
uses: actions/checkout@v4.2.1
23+
with:
24+
fetch-depth: 0
3225

33-
- name: Cache SonarCloud scanner
34-
id: cache-sonar-scanner
35-
uses: actions/cache@v4.2.3
36-
with:
37-
path: .\.sonar\scanner
38-
key: ${{ runner.os }}-sonar-scanner
39-
restore-keys: ${{ runner.os }}-sonar-scanner
40-
41-
- name: Install SonarCloud scanner
42-
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
43-
shell: powershell
44-
run: |
45-
New-Item -Path .\.sonar\scanner -ItemType Directory
46-
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
47-
48-
- name: Build and analyze
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52-
shell: powershell
53-
run: |
54-
dotnet tool install --global dotnet-coverage
55-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_astar-dev-utilities" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
56-
dotnet build --configuration Release
57-
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Acceptance.Tests"' -f xml -o 'coverage.xml'
58-
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
26+
- name: Cache SonarCloud packages
27+
uses: actions/cache@v4.2.3
28+
with:
29+
path: ~\sonar\cache
30+
key: ${{ runner.os }}-sonar
31+
restore-keys: ${{ runner.os }}-sonar
5932

60-
- name: Pack NuGet package
61-
if: github.ref == 'refs/heads/main'
62-
run: dotnet pack .\src\AStar.Dev.Utilities\AStar.Dev.Utilities.csproj
33+
- name: Cache SonarCloud scanner
34+
id: cache-sonar-scanner
35+
uses: actions/cache@v4.2.3
36+
with:
37+
path: .\.sonar\scanner
38+
key: ${{ runner.os }}-sonar-scanner
39+
restore-keys: ${{ runner.os }}-sonar-scanner
40+
41+
- name: Install SonarCloud scanner
42+
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
43+
shell: powershell
44+
run: |
45+
New-Item -Path .\.sonar\scanner -ItemType Directory
46+
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
47+
48+
- name: Build and analyze
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52+
shell: powershell
53+
run: |
54+
dotnet tool install --global dotnet-coverage
55+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_astar-dev-utilities" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
56+
dotnet build --configuration Release
57+
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Acceptance.Tests"' -f xml -o 'coverage.xml'
58+
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
59+
60+
- name: Pack NuGet package
61+
if: github.ref == 'refs/heads/main'
62+
run: dotnet pack .\src\AStar.Dev.Utilities\AStar.Dev.Utilities.csproj
63+
64+
- name: Push to NuGet
65+
if: github.ref == 'refs/heads/main'
66+
run: dotnet nuget push "**\AStar.Dev.Utilities.*.nupkg" --api-key ${{secrets.nuget_api_key}} --skip-duplicate --source https://api.nuget.org/v3/index.json
6367

64-
- name: Push to NuGet
65-
if: github.ref == 'refs/heads/main'
66-
run: dotnet nuget push "**\AStar.Dev.Utilities.*.nupkg" --api-key ${{secrets.nuget_api_key}} --skip-duplicate --source https://api.nuget.org/v3/index.json
67-

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ A collection of useful utilities. At the moment, the collection is small but wil
1717
* ToJson - as you might expect, converts the object to the appropriate JSON representation.
1818

1919
## GitHub build
20+
2021
[![Build and test solution](https://github.com/astar-development/astar-dev-utilities/actions/workflows/dotnet.yml/badge.svg)](https://github.com/astar-development/astar-dev-utilities/actions/workflows/dotnet.yml)
2122

2223
## SonarCloud Analysis Results
@@ -31,4 +32,4 @@ A collection of useful utilities. At the moment, the collection is small but wil
3132

3233
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=astar-development_astar-dev-utilities&metric=coverage)](https://sonarcloud.io/summary/new_code?id=astar-development_astar-dev-utilities)
3334

34-
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=astar-development_astar-dev-utilities&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=astar-development_astar-dev-utilities)
35+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=astar-development_astar-dev-utilities&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=astar-development_astar-dev-utilities)

src/AStar.Dev.Utilities/AStar.Dev.Utilities.csproj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@
4040
</PropertyGroup>
4141

4242
<ItemGroup>
43-
<None Include="..\..\AStar.png">
44-
<Pack>True</Pack>
45-
<PackagePath>\</PackagePath>
46-
</None>
47-
<None Include="..\..\LICENSE">
48-
<Pack>True</Pack>
49-
<PackagePath>\</PackagePath>
50-
</None>
51-
<None Include="..\..\Readme.md">
52-
<Pack>True</Pack>
53-
<PackagePath>\</PackagePath>
54-
</None>
43+
<None Include="..\..\AStar.png">
44+
<Pack>True</Pack>
45+
<PackagePath>\</PackagePath>
46+
</None>
47+
<None Include="..\..\LICENSE">
48+
<Pack>True</Pack>
49+
<PackagePath>\</PackagePath>
50+
</None>
51+
<None Include="..\..\Readme.md">
52+
<Pack>True</Pack>
53+
<PackagePath>\</PackagePath>
54+
</None>
5555
</ItemGroup>
5656

5757
<ItemGroup>
@@ -61,7 +61,7 @@
6161
</ItemGroup>
6262

6363
<ItemGroup>
64-
<PackageReference Include="TestableIO.System.IO.Abstractions.Wrappers" Version="22.0.14" />
64+
<PackageReference Include="TestableIO.System.IO.Abstractions.Wrappers" Version="22.0.14"/>
6565
</ItemGroup>
6666

6767
</Project>

0 commit comments

Comments
 (0)