diff --git a/perf/FormattedFiles.cs b/perf/FormattedFiles.cs index da3912fca0..295f1770e3 100644 --- a/perf/FormattedFiles.cs +++ b/perf/FormattedFiles.cs @@ -37,7 +37,8 @@ public void FilesFormattedFolder() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } @@ -52,7 +53,8 @@ public void FilesFormattedProject() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } @@ -67,7 +69,8 @@ public void FilesFormattedSolution() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } diff --git a/perf/NoFilesFormatted.cs b/perf/NoFilesFormatted.cs index d0537dc22c..f632fbb77b 100644 --- a/perf/NoFilesFormatted.cs +++ b/perf/NoFilesFormatted.cs @@ -37,7 +37,8 @@ public void NoFilesFormattedFolder() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } @@ -52,7 +53,8 @@ public void NoFilesFormattedProject() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } @@ -67,7 +69,8 @@ public void NoFilesFormattedSolution() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } diff --git a/perf/RealWorldSolution.cs b/perf/RealWorldSolution.cs index 13fa417069..9b2d934ce3 100644 --- a/perf/RealWorldSolution.cs +++ b/perf/RealWorldSolution.cs @@ -39,7 +39,8 @@ public void FilesFormattedSolution() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } @@ -54,7 +55,8 @@ public void FilesFormattedFolder() saveFormattedFiles: false, changesAreErrors: false, AllFileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); _ = CodeFormatter.FormatWorkspaceAsync(options, EmptyLogger, default).GetAwaiter().GetResult(); } diff --git a/src/CodeFormatter.cs b/src/CodeFormatter.cs index f4b73e0fd7..06e954324a 100644 --- a/src/CodeFormatter.cs +++ b/src/CodeFormatter.cs @@ -37,7 +37,7 @@ internal static class CodeFormatter CancellationToken cancellationToken, bool createBinaryLog = false) { - var (workspaceFilePath, workspaceType, logLevel, saveFormattedFiles, _, fileMatcher, reportPath) = options; + var (workspaceFilePath, workspaceType, logLevel, saveFormattedFiles, _, fileMatcher, reportPath, includeGeneratedFiles) = options; var logWorkspaceWarnings = logLevel == LogLevel.Trace; logger.LogInformation(string.Format(Resources.Formatting_code_files_in_workspace_0, workspaceFilePath)); @@ -62,7 +62,7 @@ internal static class CodeFormatter logger.LogTrace(Resources.Determining_formattable_files); var (fileCount, formatableFiles) = await DetermineFormattableFiles( - solution, projectPath, fileMatcher, logger, cancellationToken).ConfigureAwait(false); + solution, projectPath, fileMatcher, includeGeneratedFiles, logger, cancellationToken).ConfigureAwait(false); var determineFilesMS = workspaceStopwatch.ElapsedMilliseconds - loadWorkspaceMS; logger.LogTrace(Resources.Complete_in_0_ms, determineFilesMS); @@ -264,6 +264,7 @@ private static void LogWorkspaceDiagnostics(ILogger logger, bool logWorkspaceWar Solution solution, string projectPath, Matcher fileMatcher, + bool includeGeneratedFiles, ILogger logger, CancellationToken cancellationToken) { @@ -296,7 +297,7 @@ private static void LogWorkspaceDiagnostics(ILogger logger, bool logWorkspaceWar // Get project documents and options with .editorconfig settings applied. var getProjectDocuments = project.DocumentIds.Select(documentId => GetDocumentAndOptions( - project, documentId, fileMatcher, codingConventionsManager, optionsApplier, cancellationToken)); + project, documentId, fileMatcher, includeGeneratedFiles, codingConventionsManager, optionsApplier, cancellationToken)); getDocumentsAndOptions.AddRange(getProjectDocuments); } @@ -335,13 +336,14 @@ private static void LogWorkspaceDiagnostics(ILogger logger, bool logWorkspaceWar Project project, DocumentId documentId, Matcher fileMatcher, + bool includeGeneratedFiles, ICodingConventionsManager codingConventionsManager, EditorConfigOptionsApplier optionsApplier, CancellationToken cancellationToken) { var document = project.Solution.GetDocument(documentId); - if (document is null || await ShouldIgnoreDocument(document, fileMatcher, cancellationToken)) + if (document is null || await ShouldIgnoreDocument(document, fileMatcher, includeGeneratedFiles, cancellationToken)) { return (null, null, null, false); } @@ -364,6 +366,7 @@ private static void LogWorkspaceDiagnostics(ILogger logger, bool logWorkspaceWar private static async Task ShouldIgnoreDocument( Document document, Matcher fileMatcher, + bool includeGeneratedFiles, CancellationToken cancellationToken) { if (!fileMatcher.Match(document.FilePath).HasMatches) @@ -375,7 +378,7 @@ private static void LogWorkspaceDiagnostics(ILogger logger, bool logWorkspaceWar { return true; } - else if (await GeneratedCodeUtilities.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false)) + else if (!includeGeneratedFiles && await GeneratedCodeUtilities.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false)) { // Ignore generated code files. return true; diff --git a/src/FormatOptions.cs b/src/FormatOptions.cs index bc1263db60..403f06498e 100644 --- a/src/FormatOptions.cs +++ b/src/FormatOptions.cs @@ -14,6 +14,7 @@ internal class FormatOptions public bool ChangesAreErrors { get; } public Matcher FileMatcher { get; } public string? ReportPath { get; } + public bool IncludeGeneratedFiles { get; } public FormatOptions( string workspaceFilePath, @@ -22,7 +23,8 @@ internal class FormatOptions bool saveFormattedFiles, bool changesAreErrors, Matcher fileMatcher, - string? reportPath) + string? reportPath, + bool includeGeneratedFiles) { WorkspaceFilePath = workspaceFilePath; WorkspaceType = workspaceType; @@ -31,6 +33,7 @@ internal class FormatOptions ChangesAreErrors = changesAreErrors; FileMatcher = fileMatcher; ReportPath = reportPath; + IncludeGeneratedFiles = includeGeneratedFiles; } public void Deconstruct( @@ -40,7 +43,8 @@ internal class FormatOptions out bool saveFormattedFiles, out bool changesAreErrors, out Matcher fileMatcher, - out string? reportPath) + out string? reportPath, + out bool includeGeneratedFiles) { workspaceFilePath = WorkspaceFilePath; workspaceType = WorkspaceType; @@ -49,6 +53,7 @@ internal class FormatOptions changesAreErrors = ChangesAreErrors; fileMatcher = FileMatcher; reportPath = ReportPath; + includeGeneratedFiles = IncludeGeneratedFiles; } } } diff --git a/src/Program.cs b/src/Program.cs index e1c4e2ed73..258a2a5c02 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -55,6 +55,11 @@ private static async Task Main(string[] args) { Argument = new Argument() { Arity = ArgumentArity.ExactlyOne } }, + new Option(new[] { "--include-generated" }, Resources.Include_generated_code_files_in_formatting_operations) + { + Argument = new Argument(), + IsHidden = true + }, }; rootCommand.Description = "dotnet-format"; @@ -64,7 +69,7 @@ private static async Task Main(string[] args) return await rootCommand.InvokeAsync(args); } - public static async Task Run(string? folder, string? workspace, string? verbosity, bool check, string[] include, string[] exclude, string? report, IConsole console = null!) + public static async Task Run(string? folder, string? workspace, string? verbosity, bool check, string[] include, string[] exclude, string? report, bool includeGenerated, IConsole console = null!) { // Setup logging. var serviceCollection = new ServiceCollection(); @@ -159,7 +164,8 @@ public static async Task Run(string? folder, string? workspace, string? ver saveFormattedFiles: !check, changesAreErrors: check, fileMatcher, - reportPath: report); + reportPath: report, + includeGenerated); var formatResult = await CodeFormatter.FormatWorkspaceAsync( formatOptions, diff --git a/src/Resources.resx b/src/Resources.resx index 80bffced79..b3cd553cf8 100644 --- a/src/Resources.resx +++ b/src/Resources.resx @@ -225,4 +225,7 @@ Unable to locate MSBuild. Ensure the .NET SDK was installed with the official installer. + + Include generated code files in formatting operations. + \ No newline at end of file diff --git a/src/xlf/Resources.cs.xlf b/src/xlf/Resources.cs.xlf index e6b48524e2..7ab86eb417 100644 --- a/src/xlf/Resources.cs.xlf +++ b/src/xlf/Resources.cs.xlf @@ -102,6 +102,11 @@ Formátují se soubory kódu v pracovním prostoru {0}. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Načítá se pracovní prostor. diff --git a/src/xlf/Resources.de.xlf b/src/xlf/Resources.de.xlf index 30d89107c9..fd820aac4a 100644 --- a/src/xlf/Resources.de.xlf +++ b/src/xlf/Resources.de.xlf @@ -102,6 +102,11 @@ Codedateien im Arbeitsbereich "{0}" werden formatiert. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Arbeitsbereich wird geladen. diff --git a/src/xlf/Resources.es.xlf b/src/xlf/Resources.es.xlf index 5eae9beb28..bf8ed5e2d0 100644 --- a/src/xlf/Resources.es.xlf +++ b/src/xlf/Resources.es.xlf @@ -102,6 +102,11 @@ Aplicar formato a archivos de código en espacio de trabajo "{0}". + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Cargando área de trabajo. diff --git a/src/xlf/Resources.fr.xlf b/src/xlf/Resources.fr.xlf index 246507577c..3d752d631f 100644 --- a/src/xlf/Resources.fr.xlf +++ b/src/xlf/Resources.fr.xlf @@ -102,6 +102,11 @@ Mise en forme des fichiers de code dans l'espace de travail '{0}'. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Chargement de l'espace de travail. diff --git a/src/xlf/Resources.it.xlf b/src/xlf/Resources.it.xlf index eafd6efb5e..028f7a37d7 100644 --- a/src/xlf/Resources.it.xlf +++ b/src/xlf/Resources.it.xlf @@ -102,6 +102,11 @@ Formattazione del file di codice nell'area di lavoro '{0}'. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Caricamento dell'area di lavoro. diff --git a/src/xlf/Resources.ja.xlf b/src/xlf/Resources.ja.xlf index 10cf4718cf..2129fad217 100644 --- a/src/xlf/Resources.ja.xlf +++ b/src/xlf/Resources.ja.xlf @@ -102,6 +102,11 @@ ワークスペース '{0}' でコード ファイルを書式設定します。 + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. ワークスペースを読み込んでいます。 diff --git a/src/xlf/Resources.ko.xlf b/src/xlf/Resources.ko.xlf index 81756f1572..f9fa45927b 100644 --- a/src/xlf/Resources.ko.xlf +++ b/src/xlf/Resources.ko.xlf @@ -102,6 +102,11 @@ '{0}' 작업 영역에서 코드 파일의 서식을 지정합니다. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. 작업 영역을 로드하는 중입니다. diff --git a/src/xlf/Resources.pl.xlf b/src/xlf/Resources.pl.xlf index b2e0b85cd6..6803182a54 100644 --- a/src/xlf/Resources.pl.xlf +++ b/src/xlf/Resources.pl.xlf @@ -102,6 +102,11 @@ Formatowanie plików kodu w obszarze roboczym „{0}”. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Ładowanie obszaru roboczego. diff --git a/src/xlf/Resources.pt-BR.xlf b/src/xlf/Resources.pt-BR.xlf index 34f76c4d87..61a054e8dd 100644 --- a/src/xlf/Resources.pt-BR.xlf +++ b/src/xlf/Resources.pt-BR.xlf @@ -102,6 +102,11 @@ Formatação de arquivos de código no espaço de trabalho '{0}'. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Carregando espaço de trabalho. diff --git a/src/xlf/Resources.ru.xlf b/src/xlf/Resources.ru.xlf index 12acd55d34..b6343fce3b 100644 --- a/src/xlf/Resources.ru.xlf +++ b/src/xlf/Resources.ru.xlf @@ -102,6 +102,11 @@ Форматирование кода файлов в рабочей области "{0}". + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Загрузка рабочей области. diff --git a/src/xlf/Resources.tr.xlf b/src/xlf/Resources.tr.xlf index d04366c784..053bceccc3 100644 --- a/src/xlf/Resources.tr.xlf +++ b/src/xlf/Resources.tr.xlf @@ -102,6 +102,11 @@ Çalışma alanı '{0}' kod dosyalarında biçimlendirme. + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. Çalışma alanı yükleniyor. diff --git a/src/xlf/Resources.zh-Hans.xlf b/src/xlf/Resources.zh-Hans.xlf index 10e535db82..f9adbe9813 100644 --- a/src/xlf/Resources.zh-Hans.xlf +++ b/src/xlf/Resources.zh-Hans.xlf @@ -102,6 +102,11 @@ 正在设置工作区“{0}”中代码文件的格式。 + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. 正在加载工作区。 diff --git a/src/xlf/Resources.zh-Hant.xlf b/src/xlf/Resources.zh-Hant.xlf index 1a8d96ffa5..f08c0474bd 100644 --- a/src/xlf/Resources.zh-Hant.xlf +++ b/src/xlf/Resources.zh-Hant.xlf @@ -102,6 +102,11 @@ 正在將工作區 '{0}' 中的程式碼檔案格式化。 + + Include generated code files in formatting operations. + Include generated code files in formatting operations. + + Loading workspace. 正在載入工作區。 diff --git a/tests/CodeFormatterTests.cs b/tests/CodeFormatterTests.cs index 2234157f76..67bcd5dadf 100644 --- a/tests/CodeFormatterTests.cs +++ b/tests/CodeFormatterTests.cs @@ -45,6 +45,7 @@ public async Task NoFilesFormattedInFormattedProject() FormattedProjectFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 3); @@ -57,6 +58,7 @@ public async Task NoFilesFormattedInFormattedSolution() FormattedSolutionFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 3); @@ -69,11 +71,29 @@ public async Task FilesFormattedInUnformattedProject() UnformattedProjectFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 2, expectedFileCount: 5); } + [Fact] + public async Task GeneratedFilesFormattedInUnformattedProject() + { + var log = await TestFormatWorkspaceAsync( + UnformattedProjectFilePath, + include: EmptyFilesList, + exclude: EmptyFilesList, + includeGenerated: true, + expectedExitCode: 0, + expectedFilesFormatted: 4, + expectedFileCount: 5); + + var logLines = log.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); + Assert.Contains(logLines, line => line.Contains("unformatted_project.AssemblyInfo.cs(1,1): Fix file encoding.")); + Assert.Contains(logLines, line => line.Contains("NETCoreApp,Version=v3.0.AssemblyAttributes.cs(1,1): Fix file encoding.")); + } + [Fact] public async Task FilesFormattedInUnformattedSolution() { @@ -81,6 +101,7 @@ public async Task FilesFormattedInUnformattedSolution() UnformattedSolutionFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 2, expectedFileCount: 5); @@ -94,6 +115,7 @@ public async Task FilesFormattedInUnformattedProjectFolder() Path.GetDirectoryName(UnformattedProjectFilePath), include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 2, expectedFileCount: 3); @@ -107,6 +129,7 @@ public async Task NoFilesFormattedInUnformattedSolutionFolder() Path.GetDirectoryName(UnformattedSolutionFilePath), include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 0); @@ -119,6 +142,7 @@ public async Task FSharpProjectsDoNotCreateException() FSharpProjectFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 1, expectedFilesFormatted: 0, expectedFileCount: 0); @@ -139,6 +163,7 @@ public async Task OnlyFormatPathsFromList() UnformattedProjectFilePath, include, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 2, expectedFileCount: 5); @@ -153,6 +178,7 @@ public async Task OnlyFormatFilesFromList() UnformattedProjectFilePath, include, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 1, expectedFileCount: 5); @@ -167,6 +193,7 @@ public async Task NoFilesFormattedWhenNotInList() UnformattedProjectFilePath, include, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 5); @@ -181,6 +208,7 @@ public async Task OnlyLogFormattedFiles() UnformattedSolutionFilePath, include, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 1, expectedFileCount: 5); @@ -199,6 +227,7 @@ public async Task FormatLocationsLoggedInUnformattedProject() UnformattedProjectFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 2, expectedFileCount: 5); @@ -249,6 +278,7 @@ public async Task FormatLocationsNotLoggedInFormattedProject() FormattedProjectFilePath, include: EmptyFilesList, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 3); @@ -268,6 +298,7 @@ public async Task LogFilesThatDontMatchExclude() UnformattedSolutionFilePath, include, exclude: EmptyFilesList, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 1, expectedFileCount: 5); @@ -288,6 +319,7 @@ public async Task IgnoreFileWhenListedInExcludeList() UnformattedSolutionFilePath, include: include, exclude: include, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 5); @@ -308,6 +340,7 @@ public async Task IgnoreFileWhenContainingFolderListedInExcludeList() UnformattedSolutionFilePath, include: include, exclude: exclude, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 5); @@ -328,6 +361,7 @@ public async Task IgnoreAllFileWhenExcludingAllFiles() UnformattedSolutionFilePath, include: include, exclude: exclude, + includeGenerated: false, expectedExitCode: 0, expectedFilesFormatted: 0, expectedFileCount: 5); @@ -338,7 +372,7 @@ public async Task IgnoreAllFileWhenExcludingAllFiles() Assert.False(match.Success, log); } - public async Task TestFormatWorkspaceAsync(string workspaceFilePath, IEnumerable include, IEnumerable exclude, int expectedExitCode, int expectedFilesFormatted, int expectedFileCount) + public async Task TestFormatWorkspaceAsync(string workspaceFilePath, IEnumerable include, IEnumerable exclude, bool includeGenerated, int expectedExitCode, int expectedFilesFormatted, int expectedFileCount) { var workspacePath = Path.GetFullPath(workspaceFilePath); @@ -363,14 +397,17 @@ public async Task TestFormatWorkspaceAsync(string workspaceFilePath, IEn saveFormattedFiles: false, changesAreErrors: false, fileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGenerated); var formatResult = await CodeFormatter.FormatWorkspaceAsync(formatOptions, logger, CancellationToken.None); + var log = logger.GetLog(); + Assert.Equal(expectedExitCode, formatResult.ExitCode); Assert.Equal(expectedFilesFormatted, formatResult.FilesFormatted); Assert.Equal(expectedFileCount, formatResult.FileCount); - return logger.GetLog(); + return log; } } } diff --git a/tests/Formatters/AbstractFormatterTests.cs b/tests/Formatters/AbstractFormatterTests.cs index ee2f01d552..b87d75d443 100644 --- a/tests/Formatters/AbstractFormatterTests.cs +++ b/tests/Formatters/AbstractFormatterTests.cs @@ -101,7 +101,8 @@ private protected async Task TestAsync(string testCode, string expec saveFormattedFiles: false, changesAreErrors: false, fileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); var pathsToFormat = await GetOnlyFileToFormatAsync(solution, editorConfig); diff --git a/tests/Formatters/FormattedFilesTests.cs b/tests/Formatters/FormattedFilesTests.cs index 24527e2392..0ae409d13a 100644 --- a/tests/Formatters/FormattedFilesTests.cs +++ b/tests/Formatters/FormattedFilesTests.cs @@ -58,7 +58,8 @@ private async Task> TestFormattedFiles(string testCode) saveFormattedFiles: false, changesAreErrors: false, fileMatcher, - reportPath: string.Empty); + reportPath: string.Empty, + includeGeneratedFiles: false); var pathsToFormat = await GetOnlyFileToFormatAsync(solution, EditorConfig);