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
-[](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-ci+branch%3Amain)
+[](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-ci+branch%3Amain)
+[](https://github.com/JustArchiNET/ArchiSteamFarm/actions?query=workflow%3AASF-code-quality+branch%3Amain)
[](https://hub.docker.com/r/justarchi/archisteamfarm)
[](https://github.com/JustArchiNET/ArchiSteamFarm/commits)
[](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