diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index f17c5a6..b9afcb9 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -17,7 +17,7 @@ "rollForward": false }, "fsharp-analyzers": { - "version": "0.38.0", + "version": "0.39.0", "commands": [ "fsharp-analyzers" ], diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ed8d4f..d2cf943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.25.0] - 2026-09-10 + +### Changed + +- Update FSharp.Analyzers.SDK to `0.39.0`. [#116](https://github.com/G-Research/fsharp-analyzers/pull/116) + ## [0.24.0] - 2026-09-05 ### Changed diff --git a/Directory.Packages.props b/Directory.Packages.props index 8260556..83e9cd5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,8 +5,8 @@ - - + + diff --git a/build.fsx b/build.fsx index f3c4c2b..daccc3a 100755 --- a/build.fsx +++ b/build.fsx @@ -4,9 +4,7 @@ #r "nuget: Humanizer.Core" open System -open System.Collections.Generic open System.IO -open System.Text.RegularExpressions open System.Xml.Linq open Fun.Build open Humanizer @@ -25,18 +23,8 @@ let buildStage = let analyzersProject = __SOURCE_DIRECTORY__ "src/FSharp.Analyzers/FSharp.Analyzers.fsproj" -/// Every analyzer code (GRA-XXX-000) declared in the analyzer sources. -let analyzerCodes () = - let codes = HashSet () - - for file in Directory.EnumerateFiles (Path.GetDirectoryName analyzersProject, "*.fs") do - for m in Regex.Matches (File.ReadAllText file, "\"(GRA-[A-Z0-9-]+)\"") do - codes.Add m.Groups.[1].Value |> ignore - - codes - /// Runs the analyzers built by this repository over its own source. Requires buildStage to have run first. -/// The tool exits 0 on warnings, so every known code is escalated to an error to make findings fail the stage. +/// The tool exits 0 on warnings, so every GRA- code is escalated to an error to make findings fail the stage. let analyzeStage = stage "analyze" { run (fun ctx -> @@ -52,11 +40,10 @@ let analyzeStage = | Ok targetPath -> let analyzersPath = Path.GetDirectoryName (targetPath.Trim ()) - let treatAsError = analyzerCodes () |> String.concat " " return! ctx.RunCommand - $"dotnet fsharp-analyzers --project \"%s{analyzersProject}\" --analyzers-path \"%s{analyzersPath}\" --treat-as-error %s{treatAsError}" + $"dotnet fsharp-analyzers --project \"%s{analyzersProject}\" --analyzers-path \"%s{analyzersPath}\" --treat-as-error \"GRA-*\"" } ) }