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

Integrate analyzers via msbuild #2968

Merged
merged 17 commits into from
Oct 26, 2023

Conversation

dawedawe
Copy link
Member

The sarif file upload might not work yet. Let's try with a wildcard first and then go to a directory to collect all sarif files and upload that.

Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good start!

Directory.Build.props Outdated Show resolved Hide resolved
Directory.Build.targets Outdated Show resolved Hide resolved
Directory.Solution.targets Outdated Show resolved Hide resolved
Directory.Solution.props Outdated Show resolved Hide resolved
build.fsx Outdated Show resolved Hide resolved
build.fsx Outdated
@@ -82,6 +82,9 @@ pipeline "Build" {
stage "Build" { run "dotnet build -c Release" }
stage "Analyze" {
run (fun _ -> async { System.IO.Directory.CreateDirectory(analysisReportsDir) |> ignore })
envVars
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this closer to the tool invocation.
Can we do this right before the <Exec Command?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directory.Build.targets Outdated Show resolved Hide resolved
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two nits left but man this is good stuff! Can you check the envVars thing as well please.

@nojaf
Copy link
Contributor

nojaf commented Oct 26, 2023

--report &quot;..\..\analysisreports\$(MSBuildProjectName)-analysis.sarif&quot;

@nojaf
Copy link
Contributor

nojaf commented Oct 26, 2023

@dawedawe The reason I want to set DOTNET_ROLL_FORWARD_TO_PRERELEASE and DOTNET_ROLL_FORWARD in the target is that doing this allows for dotnet msbuild /t:AnalyzeSolution to just work from the command line.

@nojaf nojaf merged commit ee06697 into fsprojects:main Oct 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants