You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the dotnet format command with the report option, and I specify only a filename, the tool ends with an exception. Expected behaviour is that the report file is generated in the current directory.
Command:
C:\Temp>dotnet format C:\path-to\my-repository\ --folder --check --report dotnet-format-report.json
Error:
Unhandled exception: System.ArgumentException: Path cannot be the empty string or all whitespace. (Parameter 'path')
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.CodeAnalysis.Tools.ReportWriter.Write(String reportPath, IEnumerable`1 formattedFiles, ILogger logger) in /_/src/ReportWriter.cs:line 23
at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, Boolean createBinaryLog) in /_/src/CodeFormatter.cs:line 107
at Microsoft.CodeAnalysis.Tools.Program.Run(String workspace, Boolean folder, String fixStyle, String fixAnalyzers, String verbosity, Boolean check, String[] include, String[] exclude, String report, Boolean includeGenerated, IConsole console) in /_/src/Program.cs:line 150
at System.CommandLine.Invocation.CommandHandler.GetResultCodeAsync(Object value, InvocationContext context)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
The text was updated successfully, but these errors were encountered:
Styxxy
changed the title
Using option report with just a filename specified results in exception
Using option report with just a filename results in exception
Oct 16, 2020
When I run the dotnet format command with the report option, and I specify only a filename, the tool ends with an exception. Expected behaviour is that the report file is generated in the current directory.
Command:
Error:
The text was updated successfully, but these errors were encountered: