diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 68c79739d9..323078ab09 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -21,7 +21,7 @@
]
},
"fsharp-analyzers": {
- "version": "0.17.0",
+ "version": "0.17.1",
"commands": [
"fsharp-analyzers"
]
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ebe3f63893..e3b6ce1068 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,6 +27,10 @@ jobs:
- name: "trigger fantomas-tools action"
if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/main'
run: "curl -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token ${{secrets.FANTOMAS_TOOLS_TOKEN}}' --request POST --data '{\"event_type\": \"fantomas-commit-on-main\"}' https://api.github.com/repos/fsprojects/fantomas-tools/dispatches"
+ - name: "Run analyzers"
+ run: dotnet msbuild /t:AnalyzeSolution
+ continue-on-error: true
+ if: matrix.os == 'ubuntu-latest'
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
if: matrix.os == 'ubuntu-latest'
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 7303c8418d..aa15e275d3 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -12,7 +12,7 @@
+ Command="dotnet fsharp-analyzers --fsc-args "@(FscCommandLineArgs)" --analyzers-path "$(PkgG-Research_FSharp_Analyzers)/analyzers/dotnet/fs" --exclude-analyzer PartialAppAnalyzer --fail-on-warnings GRA-STRING-001 GRA-STRING-002 GRA-STRING-003 GRA-UNIONCASE-001 --verbose --report "../../analysisreports/$(MSBuildProjectName)-analysis.sarif"">
diff --git a/build.fsx b/build.fsx
index 61a4a892f6..6bc04fc513 100644
--- a/build.fsx
+++ b/build.fsx
@@ -79,10 +79,6 @@ pipeline "Build" {
}
stage "CheckFormat" { run "dotnet fantomas src docs build.fsx --check" }
stage "Build" { run "dotnet build -c Release" }
- stage "Analyze" {
- run (fun _ -> async { System.IO.Directory.CreateDirectory(analysisReportsDir) |> ignore })
- run "dotnet msbuild /t:AnalyzeSolution"
- }
stage "UnitTests" { run "dotnet test -c Release" }
stage "Pack" { run "dotnet pack --no-restore -c Release -o ./bin" }
stage "Docs" {