From 06e10fa32a54cc5f9305b754d7682f05f1088006 Mon Sep 17 00:00:00 2001 From: Archi Date: Wed, 8 Feb 2023 20:57:36 +0100 Subject: [PATCH] Add initial support for Qodana --- .github/workflows/code-quality.yml | 25 +++++++++++++++++++++++++ ArchiSteamFarm.sln.DotSettings | 2 +- README.md | 3 ++- qodana.yaml | 15 +++++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/code-quality.yml create mode 100644 qodana.yaml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 000000000..e46b110cf --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,25 @@ +name: ASF-code-quality + +on: [push, pull_request] + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + +jobs: + main: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3.3.0 + + - name: Run Qodana scan + uses: JetBrains/qodana-action@v2022.3.3 + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + + - name: Report Qodana results to GitHub + uses: github/codeql-action/upload-sarif@v2.2.2 + with: + sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json diff --git a/ArchiSteamFarm.sln.DotSettings b/ArchiSteamFarm.sln.DotSettings index 830956d26..edb4170f9 100644 --- a/ArchiSteamFarm.sln.DotSettings +++ b/ArchiSteamFarm.sln.DotSettings @@ -6,7 +6,6 @@ False True True - ExplicitlyExcluded SOLUTION True @@ -242,6 +241,7 @@ SUGGESTION WARNING WARNING + WARNING WARNING SUGGESTION SUGGESTION diff --git a/README.md b/README.md index 84d93f41c..697cbb8a1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ # ArchiSteamFarm -[![Build status (GitHub)](https://img.shields.io/github/actions/workflow/status/JustArchiNET/ArchiSteamFarm/ci.yml?branch=main&label=Github&logo=github&cacheSeconds=600)](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-ci+branch%3Amain) +[![Build status (GitHub)](https://img.shields.io/github/actions/workflow/status/JustArchiNET/ArchiSteamFarm/ci.yml?branch=main&label=Build&logo=github&cacheSeconds=600)](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-ci+branch%3Amain) +[![Quality status (GitHub)](https://img.shields.io/github/actions/workflow/status/JustArchiNET/ArchiSteamFarm/code-quality.yml?branch=main&label=Quality&logo=github&cacheSeconds=600)](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-code-quality+branch%3Amain) [![Build status (Docker)](https://img.shields.io/github/actions/workflow/status/JustArchiNET/ArchiSteamFarm/docker-publish-main.yml?branch=main&label=Docker&logo=docker&cacheSeconds=600)](https://hub.docker.com/r/justarchi/archisteamfarm) [![Github last commit date](https://img.shields.io/github/last-commit/JustArchiNET/ArchiSteamFarm.svg?label=Updated&logo=github&cacheSeconds=600)](https://github.com/JustArchiNET/ArchiSteamFarm/commits) [![Total downloads](https://img.shields.io/github/downloads/JustArchiNET/ArchiSteamFarm/total.svg?label=Downloads&logo=github&cacheSeconds=600)](https://github.com/JustArchiNET/ArchiSteamFarm/releases) diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 000000000..17927caf0 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,15 @@ +version: "1.0" +linter: jetbrains/qodana-dotnet:latest +failThreshold: 0 +profile: + name: qodana.recommended +exclude: + - name: All + paths: + - ArchiSteamFarm/Localization + - ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization + - ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Localization + - name: InvertIf + - name: SwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault + - name: SwitchStatementHandlesSomeKnownEnumValuesWithDefault + - name: SwitchStatementMissingSomeEnumCasesNoDefault