This PR adds a feature to automatically detect the output format based on the provided output filename's extension. If the -fn (or --filename) option is set but --json or the future --bom-format option is not set, the format is derived from the file extension. Explicit parameters --json or --bom-format will take precedence if set.
Changes
Added a new method SetOutputFormatFromFilename in Runner.cs to determine the format from the file extension.
Description
This PR adds a feature to automatically detect the output format based on the provided output filename's extension. If the
-fn
(or--filename
) option is set but--json
or the future--bom-format
option is not set, the format is derived from the file extension. Explicit parameters--json
or--bom-format
will take precedence if set.Changes
SetOutputFormatFromFilename
inRunner.cs
to determine the format from the file extension..xml
,.json
,.proto
,.pb
,.bin
.HandleCommandAsync
method ofRunner.cs
.Testing
Related Issues
Please review the changes and provide feedback.