Files in the project are formatted successfully.
dotnet csharpier format .
Unhandled exception: System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex')
at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex, Int32 length)
at CSharpier.Core.PrinterOptions.GetFormatter(String filePath) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Core/PrinterOptions.cs:line 41
at CSharpier.Cli.EditorConfig.EditorConfigSections.ConvertToPrinterOptions(String filePath, Boolean ignoreDirectory) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/EditorConfig/EditorConfigSections.cs:line 21
at CSharpier.Cli.Options.OptionsProvider.GetPrinterOptionsForAsync(String filePath, CancellationToken cancellationToken) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/Options/OptionsProvider.cs:line 143
at CSharpier.Cli.CommandLineFormatter.<>c__DisplayClass1_1.<<FormatPhysicalFiles>g__FormatFile|0>d.MoveNext() in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/CommandLineFormatter.cs:line 245
--- End of stack trace from previous location ---
at CSharpier.Cli.CommandLineFormatter.FormatPhysicalFiles(CommandLineFormatterResult commandLineFormatterResult, CommandLineOptions commandLineOptions, IFileSystem fileSystem, IConsole console, ILogger logger, CancellationToken cancellationToken) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/CommandLineFormatter.cs:line 307
at CSharpier.Cli.CommandLineFormatter.Format(CommandLineOptions commandLineOptions, IFileSystem fileSystem, IConsole console, ILogger logger, CancellationToken cancellationToken) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/CommandLineFormatter.cs:line 116
at CSharpier.Cli.FormattingCommands.FormatOrCheck(String[] directoryOrFile, Boolean check, Boolean skipValidation, Boolean skipWrite, Boolean writeStdout, Boolean noCache, Boolean noMSBuildCheck, Boolean includeGenerated, Boolean compilationErrorsAsWarnings, String configPath, String ignorePath, String stdinPath, LogLevel logLevel, LogFormat logFormat, CancellationToken cancellationToken) in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/FormattingCommands.cs:line 199
at CSharpier.Cli.FormattingCommands.<>c__DisplayClass0_0.<<CreateFormatCommand>b__0>d.MoveNext() in /home/runner/work/csharpier/csharpier/Src/CSharpier.Cli/FormattingCommands.cs:line 62
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
Environments:
Steps to reproduce:
In the cli run:
dotnet csharpier format .Expected behavior:
Files in the project are formatted successfully.
Actual behavior: