microsoft / sarif-sdk

.NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/oasis-tcs/sarif-spec)
Other
191 stars 88 forks source link

Multitool convert documentation typo #2730

Open Jiri-Stary opened 9 months ago

Jiri-Stary commented 9 months ago

sarif convert

Hi i think there is a typo in the docs https://github.com/microsoft/sarif-sdk/blob/main/docs/multitool-usage.md

: Convert a Fortify file to SARIF Sarif.Multitool convert Current.fpr -tool FortifyFpr -output Current.sarif

running this command fails since it parses like -t ool and -o utput

Spent some time scratching my head what was wrong

boris-ning-usds commented 8 months ago

Oooh, I just bit this same problem. Was scratching my head all the same.

Run npx @microsoft/sarif-multitool convert results.fpr -tool FortifyFpr -output results.sarif
System.ArgumentException: Unrecognized tool specified: ool (Parameter 'toolFormat')
   at Microsoft.CodeAnalysis.Sarif.Converters.ToolFormatConverter.ConvertToStandardFormat(String toolFormat, Stream inputStream, IResultLogWriter outputStream, OptionallyEmittedData dataToInsert, String pluginAssemblyPath)
   at Microsoft.CodeAnalysis.Sarif.Converters.ToolFormatConverter.ConvertToStandardFormat(String toolFormat, String inputFileName, String outputFileName, FilePersistenceOptions logFilePersistenceOptions, OptionallyEmittedData dataToInsert, String pluginAssemblyPath)
   at Microsoft.CodeAnalysis.Sarif.Multitool.ConvertCommand.Run(ConvertOptions convertOptions, IFileSystem fileSystem)