diff --git a/README.md b/README.md index 8f86783fa1..e381d3e3cf 100644 --- a/README.md +++ b/README.md @@ -10,60 +10,42 @@ `dotnet-format` is a code formatter for `dotnet` that applies style preferences to a project or solution. Preferences will be read from an `.editorconfig` file, if present, otherwise a default set of preferences will be used. At this time `dotnet-format` is able to format C# and Visual Basic projects with a subset of [supported .editorconfig options](./docs/Supported-.editorconfig-options.md). -### New in v5.0.211103 - -### New Features -- Can now apply codestyle codefixes automatically with `dotnet format --fix-style` -- Can now apply analyzer codefixes automatically with `dotnet format --fix-analyzers` - -### Breaking Changes - -Removed Deprecated options from 4.0: -- Removed `--dry-run` should use `--check` instead -- Removed `--files` should use `--include` instead -- Removed `--workspace` this option is now implied - -#### Changes: -- [Isolate each Analyzer assembly into its own LoadContext. (959)](https://www.github.com/dotnet/format/pull/959) -- [Implement GetDocumentDiagnosticsAsync in CodeFix DiagnosticProvider (958)](https://www.github.com/dotnet/format/pull/958) -- [Fix missing ` in README.md (914)](https://www.github.com/dotnet/format/pull/914) -- [Add unit test for 3rd party fixer formatting (896)](https://www.github.com/dotnet/format/pull/896) -- [Add unit test for code style fixer formatting (893)](https://www.github.com/dotnet/format/pull/893) -- [Improve FixAll support by using equivalence key when available (884)](https://www.github.com/dotnet/format/pull/884) -- [Only run analyzers against specified project when workspace is a project (865)](https://www.github.com/dotnet/format/pull/865) -- [When matching all files don't rely on FileMatcher (864)](https://www.github.com/dotnet/format/pull/864) -- [Fix markdown formatting in example table (858)](https://www.github.com/dotnet/format/pull/858) -- [Add ability to read --{in,ex}clude value from stdin (790)](https://www.github.com/dotnet/format/pull/790) -- [Add test to ensure code containing comment is treated as generated. (857)](https://www.github.com/dotnet/format/pull/857) -- [Fixes #834 : error reportfile without directory specified (842)](https://www.github.com/dotnet/format/pull/842) -- [Log there were warnings loading the workspace if diagnostics are reported (841)](https://www.github.com/dotnet/format/pull/841) -- [Fix CommandLine_AllArguments_Bind test (818)](https://www.github.com/dotnet/format/pull/818) -- [Fix Run argument names (817)](https://www.github.com/dotnet/format/pull/817) -- [Add option for whitespace formatting (774)](https://www.github.com/dotnet/format/pull/774) -- [Load analyzer assemlbies in their own AssemblyLoadContext (746)](https://www.github.com/dotnet/format/pull/746) -- [Check that file exists before considering it for formatting (775)](https://www.github.com/dotnet/format/pull/775) -- [Report formatted files and counts based based on reported issues. (776)](https://www.github.com/dotnet/format/pull/776) -- [Support generated_code editorconfig setting (780)](https://www.github.com/dotnet/format/pull/780) -- [Create integrations.md (777)](https://www.github.com/dotnet/format/pull/777) -- [Fix warnings and apply suggestions. (767)](https://www.github.com/dotnet/format/pull/767) -- [Improve folder workspace performance (763)](https://www.github.com/dotnet/format/pull/763) -- [Improve folder performance (760)](https://www.github.com/dotnet/format/pull/760) -- [Update --include and --exclude documentation (761)](https://www.github.com/dotnet/format/pull/761) -- [Remove aliases for the fix style and fix analyzers options (753)](https://www.github.com/dotnet/format/pull/753) -- [Run analyzers during integration tests (728)](https://www.github.com/dotnet/format/pull/728) -- [Remove unnecessary imports (749)](https://www.github.com/dotnet/format/pull/749) -- [Only include compiler diagnostics if a fixer supports them (750)](https://www.github.com/dotnet/format/pull/750) -- [Added CodeFormatter tests for `--fix-style` (751)](https://www.github.com/dotnet/format/pull/751) -- [Format one solution per repo during integration tests (739)](https://www.github.com/dotnet/format/pull/739) -- [Filter analyzers by project language before running (725)](https://www.github.com/dotnet/format/pull/725) -- [Run all analyzers even when a fixer isn't present (723)](https://www.github.com/dotnet/format/pull/723) -- [Update documentation for analyzers (722)](https://www.github.com/dotnet/format/pull/722) -- [Add devcontainer to better support Codespaces (721)](https://www.github.com/dotnet/format/pull/721) -- [Add validation when specifying --folder and analyzers (715)](https://www.github.com/dotnet/format/pull/715) -- [Merge in Feature/analyzers (713)](https://www.github.com/dotnet/format/pull/713) -- [Remove deprecated options and aliases (710)](https://www.github.com/dotnet/format/pull/710) -- [Added reflection based discovery of analyzers and fixes (698)](https://www.github.com/dotnet/format/pull/698) -- [Only run Imports formatter when is has configuration in the .editorconfig (701)](https://www.github.com/dotnet/format/pull/701) +### New in v5.1 + +#### New Features + +- Can now specify that format run against a solution filter with `dotnet format solution.slnf` +- Can now filter diagnostics with `dotnet format --fix-analyzers --diagnostics ID0001` +- Can now generate a MSBuild binary log with `dotnet format --binary-log PATH` +- Now with support for analyzers, such as the [PublicApiAnalyzers](https://github.com/dotnet/roslyn-analyzers#microsoftcodeanalysispublicapianalyzers), which update non-code files + +#### Breaking Changes + +- Implicit restore when fixing code style or 3rd party analyzers (disable with `--no-restore`) +- Adopt csc style for warnings and errors +- Warnings and errors are now written to the standard error stream + +#### Changes +- [Update System.CommandLine to 2.0.0-beta1.21216.1 (1118)](https://www.github.com/dotnet/format/pull/1118) +- [Support AdditionalDocument changes (1106)](https://www.github.com/dotnet/format/pull/1106) +- [Fix typo in examples (1082)](https://www.github.com/dotnet/format/pull/1082) +- [Run CodeStyle formatter before removing unnecessary imports (1071)](https://www.github.com/dotnet/format/pull/1071) +- [Allow Solution Filter files to be passed as the workspace path (1059)](https://www.github.com/dotnet/format/pull/1059) +- [Add .pre-commit-hooks.yaml (872)](https://www.github.com/dotnet/format/pull/872) +- [Add implicit restore when running analysis. Adds `--no-restore` option. (1015)](https://www.github.com/dotnet/format/pull/1015) +- [Add separate command for binary log (1044)](https://www.github.com/dotnet/format/pull/1044) +- [Use correct flag for codestyle codefixes (1037)](https://www.github.com/dotnet/format/pull/1037) +- [Enhance whitespace issue logging with a detailed TextChange message (1017)](https://www.github.com/dotnet/format/pull/1017) +- [Log all formatter error messages in a csc-style (1016)](https://www.github.com/dotnet/format/pull/1016) +- [LogDebug each project's applied .editorconfig (1013)](https://www.github.com/dotnet/format/pull/1013) +- [Add option to filter diagnostics by id (1007)](https://www.github.com/dotnet/format/pull/1007) +- [Fix pre-commit directory (1004)](https://www.github.com/dotnet/format/pull/1004) +- [Log warnings and errors to the standard error stream (982)](https://www.github.com/dotnet/format/pull/982) +- [Only report fixable compiler diagnostics. (981)](https://www.github.com/dotnet/format/pull/981) + +### .NET Core 2.1 SDK Support + +The dotnet-format 5.x releases will continue to support users who only have .NET Core 2.1 SDK installed. Releases with bug fixes will continue until it reaches [end of support](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) on August 21, 2021. Version 6.0 will require .NET Core SDK 3.1 or higher. ### How To Install diff --git a/azure-pipelines-integration.yml b/azure-pipelines-integration.yml index 63cdf86d5e..50659c25fa 100644 --- a/azure-pipelines-integration.yml +++ b/azure-pipelines-integration.yml @@ -30,12 +30,6 @@ jobs: _targetSolution: "Compilers.sln" _branchName: "main" _sha: "7e99a9ab877c4233b6a87c555d4c42b29f40c553" - sdk: - _repo: "https://github.com/dotnet/sdk" - _repoName: "dotnet/sdk" - _targetSolution: "sdk.sln" - _branchName: "master" - _sha: "41cd7eb0d418f558c03459dfabef3601019d97b6" project-system: _repo: "https://github.com/dotnet/project-system" _repoName: "dotnet/project-system" @@ -48,24 +42,12 @@ jobs: _targetSolution: "MSBuild.sln" _branchName: "master" _sha: "0be0490bd1261ff4a6ad64267879b36a63a33faf" - aspnetcore: - _repo: "https://github.com/dotnet/aspnetcore" - _repoName: "dotnet/aspnetcore" - _targetSolution: "AspNetCore.sln" - _branchName: "main" - _sha: "1e19c6fd19fe2f19af25da25f86d90b6fd2623fc" efcore: _repo: "https://github.com/dotnet/efcore" _repoName: "dotnet/efcore" _targetSolution: "All.sln" _branchName: "main" _sha: "f1a0d8c9928668310336565e73861a7e1702ddaf" - ef6: - _repo: "https://github.com/dotnet/ef6" - _repoName: "dotnet/ef6" - _targetSolution: "EntityFramework.sln" - _branchName: "main" - _sha: "ad101227fdf8ef7c2028f1b0ee2f73c426c56a33" timeoutInMinutes: 60 steps: - script: eng\integration-test.cmd -repo '$(_repo)' -branchName '$(_branchName)' -sha '$(_sha)' -targetSolution '$(_targetSolution)' -testPath '$(Build.SourcesDirectory)\temp' -stage 'prepare' diff --git a/src/dotnet-format.csproj b/src/dotnet-format.csproj index 1aa8b184df..ccd9980621 100644 --- a/src/dotnet-format.csproj +++ b/src/dotnet-format.csproj @@ -19,7 +19,7 @@ true - 2.1.0-rc1 + 2.1.0 LatestMajor true