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

Upgrade Sarif parser to 2.1.0 #243

Merged
merged 2 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ It is possible to process several reports at the same time: `NVika parsereport r
## Analysis tools
### Supported
- [InspectCode](https://chocolatey.org/packages/resharper-clt): example of usage `inspectcode /o="inspectcodereport.xml" "Vika.sln"`
- Analyzers producing [SARIF](http://sarifweb.azurewebsites.net) format, like Roslyn analyzers: for those you need to add an `ErrorLog` node in your `csproj` containing the path of the report, or an `/errorlog:<reportPath>` switch for `csc`; See [NVika.csproj](https://github.com/laedit/vika/blob/master/src/NVika/NVika.csproj)
- Analyzers producing [SARIF](http://sarifweb.azurewebsites.net) format, like Roslyn analyzers: for those you need to add an `ErrorLog` node in your `csproj` containing the path of the report followed by `;version=2` in order to produce a SARIF 2.1 version report, or an `/errorlog:<reportPath>;version=2` switch for `csc`; See [NVika.csproj](https://github.com/laedit/vika/blob/master/src/NVika/NVika.csproj)
- [FxCop](https://msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx): example of usage `fxcopcmd /file:NVika.dll /out:FxCopResults.xml`. Or activate Code Analysis in the corresponding tab of your project properties in Visual Studio.
- [Mono.Gendarme](http://www.mono-project.com/docs/tools+libraries/tools/gendarme/): example of usafe `gendarme --xml GendarmeReport.xml "\GendarmeTest.exe"`

Expand All @@ -55,7 +55,7 @@ It is possible to process several reports at the same time: `NVika parsereport r
- [ContinuaCI](https://github.com/laedit/vika/issues/3)?
- [MyGet](https://github.com/laedit/vika/issues/5)?

I really wondering if there is any value to supporting these three, because there doesn't support to add build message like AppVeyor but only log message.
I am really wondering if there is any value to supporting these three, because there doesn't support to add build message like AppVeyor but only log message.
And they support custom HTML report, so an xslt transformation is enough.

## What it will be
Expand Down
24 changes: 6 additions & 18 deletions build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,17 @@ Target "RestorePackages" (fun _ ->
)

Target "BeginSonarQube" (fun _ ->
"msbuild-sonarqube-runner" |> Choco.Install id
"sonarscanner-msbuild-net46" |> Choco.Install id

SonarQube Begin (fun p ->
{p with
ToolsPath = "MSBuild.SonarQube.Runner.exe"
Key = "laedit_vika"
Name = "Vika"
Version = version
Settings = [
"sonar.host.url=https://sonarcloud.io";
"sonar.login=" + environVar "SonarQube_Token";
"sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\"";
"sonar.links.homepage=https://github.com/laedit/vika";
"sonar.links.ci=https://ci.appveyor.com/project/laedit/vika";
"sonar.links.issue=https://github.com/laedit/vika/issues";
"sonar.organization=laedit-github"
] })
directExec(fun info ->
info.FileName <- "SonarScanner.MSBuild.exe"
info.Arguments <- "begin /k:\"laedit_vika\" /n:\"Vika\" /o:laedit-github /v:\"" + version + "\" /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=" + environVar "SonarQube_Token" + " /d:sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\" /d:sonar.links.homepage=https://github.com/laedit/vika /d:sonar.links.ci=https://ci.appveyor.com/project/laedit/vika /d:sonar.links.issue=https://github.com/laedit/vika/issues" ) |> ignore
)

Target "EndSonarQube" (fun _ ->
SonarQube End (fun p ->
{p with
ToolsPath = "MSBuild.SonarQube.Runner.exe"
ToolsPath = "SonarScanner.MSBuild.exe"
Settings = [ "sonar.login=" + environVar "SonarQube_Token" ]
})
)
Expand All @@ -75,7 +63,7 @@ Target "InspectCodeAnalysis" (fun _ ->

directExec(fun info ->
info.FileName <- "inspectcode"
info.Arguments <- "/o=\"" + artifactsDir + "inspectcodereport.xml\" /project=\"NVika\" \"src\Vika.sln\"" ) |> ignore
info.Arguments <- "-o=\"" + artifactsDir + "inspectcodereport.xml\" --project=\"NVika\" \"src\Vika.sln\" --toolset=14.0" ) |> ignore
)

let saveGendarmeReportAsGist report =
Expand Down
Loading