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

Update C# langversion to 13 #83

Merged
merged 28 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1ea6ec1
Update C# langversion to 13
FrankvdStam Jan 15, 2025
870a7bd
Enable nullable in soulmemory. Fix all compiler errors by throwing ? …
FrankvdStam Jan 17, 2025
58c31b6
enable nullable in soulsplitter.csproj
FrankvdStam Jan 17, 2025
6633ef4
Fix tests
FrankvdStam Jan 17, 2025
d9c8af0
Convert to file scoped namespaces
FrankvdStam Jan 17, 2025
19c6c6e
Addressing code quality: redudant types with new(), collection expres…
FrankvdStam Jan 24, 2025
f3e1ff7
Usings, converters & more nullability
FrankvdStam Jan 24, 2025
f3bfdbc
Switch expressions, more nullability & other improvements
FrankvdStam Jan 24, 2025
ad7c510
More improvements
FrankvdStam Jan 24, 2025
5876e39
Fix nullable position asingment
FrankvdStam Jan 24, 2025
a7056fa
More improvements, editing qodana settings
FrankvdStam Jan 24, 2025
9c2d216
Add qodana dependencyOverrides license info for NETStandard.Library
FrankvdStam Jan 24, 2025
c4c9ba5
Fixed last qodana issues (apart from coverage). Set test projects to …
FrankvdStam Jan 24, 2025
194723a
Replace sonarqube with qodana
FrankvdStam Jan 24, 2025
7be18f2
Extract version from build.props
FrankvdStam Jan 24, 2025
2fcf0d2
Set filename to version
FrankvdStam Jan 24, 2025
9a4b7d6
Try with failureConditions
FrankvdStam Jan 24, 2025
04960f6
Add baseline
FrankvdStam Jan 24, 2025
f788397
Remove sonar badges
FrankvdStam Jan 24, 2025
8c2768b
remove fixes since it seems to have some errors in the qodana servers
FrankvdStam Jan 24, 2025
7aaa3f7
Add baseline path, add github code scanning
FrankvdStam Jan 25, 2025
1389f6a
Regenerate baseline json
FrankvdStam Jan 25, 2025
c3fd6f2
Remove push fixes & add linter
FrankvdStam Jan 25, 2025
d50d882
Regenerate qodana baseline again...
FrankvdStam Jan 25, 2025
48472a6
Bump qodana action version
FrankvdStam Jan 25, 2025
a22726a
Remove linter
FrankvdStam Jan 25, 2025
9034c6a
continue on error, new baseline json
FrankvdStam Jan 25, 2025
167f059
set fresh to 20
FrankvdStam Jan 25, 2025
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
52 changes: 27 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,48 @@ jobs:
build:
name: build
runs-on: windows-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
#clone, setup dotnet, restore packages
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: get version
shell: pwsh
run: |
$version = select-xml -path "Directory.Build.props" -xpath "//PropertyGroup//Version" | Select-Object -ExpandProperty Node | Select-Object -ExpandProperty '#text'
echo "VERSION=$version" >> $env:GITHUB_ENV

- name: setup dotnet
uses: actions/setup-dotnet@v3

- name: dotnet restore
run: dotnet restore

- name: setup sonarqube
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/setup-sonar
- name: Build solution
run: dotnet build -c release

#build with sonar analysis enabled
- name: Build and analyze
- name: Run tests with code coverage
run: dotnet test /p:CollectCoverage=true /p:CoverletOutput=../../.qodana/code-coverage/ /p:CoverletOutputFormat=lcov

- name: Qodana Scan
if: ${{ !github.event.pull_request.head.repo.fork }}
continue-on-error: true
uses: JetBrains/[email protected]
with:
args: --baseline,qodana.sarif.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.cs.opencover.reportsPaths=tests/**/*.xml
dotnet build src/soulsplitter/soulsplitter.csproj -c release /p:Platform=x64
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

#Forked repo's don't have access to the repository secrets and are unable to run sonarqube analysis
- name: Build only
if: ${{ github.event.pull_request.head.repo.fork }}
shell: powershell
run: |
dotnet build src/soulsplitter/soulsplitter.csproj -c release /p:Platform=x64
dotnet test

- name: Build CliTimer
shell: powershell
run: dotnet build src\CliTimer\CliTimer.csproj -c release /p:Platform=x64
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

- name: upload to github code scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json

#Collect all the artifacts and publish them
- name: collect artifacts
Expand Down Expand Up @@ -98,5 +100,5 @@ jobs:
- name: Publish SoulSplitter
uses: actions/upload-artifact@v4
with:
name: SoulSplitter
name: ${{ env.VERSION }}
path: artifact
33 changes: 0 additions & 33 deletions .github/workflows/qodana.yml

This file was deleted.

13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@
</p>

<p align="center">
<a href="https://sonarqube.wastedcloud.nl/dashboard?id=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa">
<img src="https://sonarqube.wastedcloud.nl/api/project_badges/measure?project=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa&metric=alert_status&token=dcf5066558434982e851acb72b72235195d99b6e&branch=main"/>
</a>
<a href="https://sonarqube.wastedcloud.nl/dashboard?id=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa">
<img src="https://sonarqube.wastedcloud.nl/api/project_badges/measure?project=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa&metric=ncloc&token=dcf5066558434982e851acb72b72235195d99b6e&branch=main"/>
</a>
<a href="https://sonarqube.wastedcloud.nl/dashboard?id=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa">
<img src="https://sonarqube.wastedcloud.nl/api/project_badges/measure?project=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa&metric=coverage&token=dcf5066558434982e851acb72b72235195d99b6e&branch=main"/>
</a>
<a href="https://sonarqube.wastedcloud.nl/dashboard?id=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa">
<img src="https://sonarqube.wastedcloud.nl/api/project_badges/measure?project=FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa&metric=sqale_rating&token=dcf5066558434982e851acb72b72235195d99b6e&branch=main"/>
</a>
<br/>
<a href="https://github.com/FrankvdStam/SoulSplitter/actions">
<img src="https://img.shields.io/github/actions/workflow/status/FrankvdStam/SoulSplitter/build.yml?branch=main"/>
</a>
Expand Down
1 change: 0 additions & 1 deletion SoulSplitter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\debug.yml = .github\workflows\debug.yml
.github\workflows\issues.yml = .github\workflows\issues.yml
.github\workflows\qodana.yml = .github\workflows\qodana.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setup-sonar", "setup-sonar", "{2F6D0351-99A1-4E2A-98B8-7FE636A53F89}"
Expand Down
Loading
Loading