-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move dotnet/format to dotnet/sdk #38857
Merged
Merged
Changes from all commits
Commits
Show all changes
3323 commits
Select commit
Hold shift + click to select a range
fc5cc04
Include external access layer for Razor
sharwell 801d245
Merge pull request #1990 from dotnet/merges/release/8.x-to-main
dotnet-bot 84eb2b7
Merge pull request #1989 from sharwell/ea-layer
sharwell 2c6f36d
Merge remote-tracking branch 'dotnet/release/7.x' into merges/release…
sharwell 580368d
Merge pull request #1991 from dotnet/merges/release/7.x-to-release/8.x
sharwell db7e0d5
[release/8.x] Update dependencies from dotnet/roslyn (#1968)
dotnet-maestro[bot] 7096dd8
Merge pull request #1992 from dotnet/merges/release/8.x-to-main
dotnet-bot 5f8c76c
Migrate official build pipeline to dnceng (#1988)
jjonescz cecb88a
Merge branch 'release/8.x' into darc-release/8.x-c23d961a-f29c-4127-b…
jjonescz c519d26
Migrate official build pipeline to dnceng
jjonescz 79b771c
Update VS version used for signed builds
jjonescz ecc2f27
Disable signing validation
jjonescz fd1f33b
Merge pull request #1967 from dotnet/darc-release/8.x-c23d961a-f29c-4…
jjonescz 5190325
Merge pull request #1970 from dotnet/darc-main-659d666e-101e-4dad-85f…
jjonescz 4b74199
Merge pull request #1927 from dotnet/darc-release/7.x-98c6a3f6-f7e9-4…
jjonescz de93580
[main] Update dependencies from dotnet/roslyn (#1924)
dotnet-maestro[bot] 2d8acfd
[release/8.x] Update dependencies from dotnet/runtime (#1987)
dotnet-maestro[bot] 3c3c81d
Merge branch 'release/8.x' into merges/release/7.x-to-release/8.x
ViktorHofer aadaa16
Merge pull request #1994 from dotnet/merges/release/7.x-to-release/8.x
ViktorHofer febf17c
Merge branch 'main' into merges/release/8.x-to-main
ViktorHofer 2a374a5
Merge pull request #1995 from dotnet/merges/release/8.x-to-main
dotnet-bot c18a4af
[main] Update dependencies from dotnet/arcade (#1973)
dotnet-maestro[bot] 57d13ca
[main] Update dependencies from dotnet/runtime (#1969)
dotnet-maestro[bot] eddf4f3
Merge branch 'main' into merges/release/8.x-to-main
ViktorHofer a99dd51
Update NuGet.config
ViktorHofer 03e4fb2
Update Version.Details.xml
ViktorHofer 8a707d9
Merge pull request #1996 from dotnet/merges/release/8.x-to-main
ViktorHofer f5f24f3
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 5bb432b
Merged PR 34796: [internal/release/8.x] Update dependencies from dnce…
dotnet-bot 592b10a
Merged PR 34804: [internal/release/8.x] Update dependencies from dnce…
dotnet-bot 52642a8
Merged PR 34837: Set up private feeds before building
mmitche 725ae8c
Wait for process redirection to start before calling WaitForExit
mslukebo 706bcdf
Dispose of MRE on cancel path
mslukebo 1e3f9b7
Remove lock
mslukebo 649db1d
[main] Update dependencies from dotnet/arcade (#1999)
dotnet-maestro[bot] 3646b1c
[main] Update dependencies from dotnet/arcade (#2001)
dotnet-maestro[bot] 7875aea
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 553764f
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] af05872
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] dc9fa05
Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…
dotnet-bot d71cade
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] 78c3592
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 7985706
Update dependencies from https://github.com/dotnet/roslyn build 20231…
dotnet-maestro[bot] aa7c923
Merge in 'release/8.x' changes
dotnet-bot 3bef1e4
Merged PR 34921: [internal/release/8.x] Update dependencies from dnce…
dotnet-bot dc4fe25
Merge branch 'main' into merges/release/8.x-to-main
ViktorHofer 1e942c1
Merge pull request #2010 from dotnet/merges/release/8.x-to-main
ViktorHofer ae704a7
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 2651752
Merged PR 34959: [internal/release/8.x] Update dependencies from dnce…
dotnet-bot 65966ca
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 9d4baf6
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] ebac601
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] d5bd7ef
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] db8c5ca
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 448505c
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] aa43f67
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] b246fa4
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 2a762f0
Merge pull request #2000 from mslukebo/user/lukebo/processWait
sharwell 40777d5
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] ac898ed
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] ae20800
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] cb4c453
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 4e187bc
Rmove unneeded sources from NuGet.config
mmitche 28925c0
Merge pull request #2031 from mmitche/merge-from-rtm
mmitche 10e0a79
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] e730bad
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] f0e966d
Reverts the https://github.com/dotnet/format/pull/1983 pull request t…
MiYanni 919e37f
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 0bdb5f3
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 7058f2a
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 46077f5
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] c61caa3
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] bfe4cc1
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] fd32df2
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] ba3af10
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 2ea1f44
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 71257e1
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] e09a44f
Remove Microsoft.SourceBuild.Intermediate from prebuilt baseline (#2047)
ellahathaway 947156d
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 156f6ee
Update Version.Details.xml (#2048)
ViktorHofer 3a3bfe1
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 9484e6c
Update dependencies from https://github.com/dotnet/arcade build 20231…
dotnet-maestro[bot] 5c9a041
Remove GitHub automation requiring reviews when the SDK version changes
jeffhandley f198eb6
Merge pull request #2053 from jeffhandley/jeffhandley/remove-sdkversi…
arunchndr 4425369
[main] Update dependencies from dotnet/arcade (#2054)
dotnet-maestro[bot] ec8dd5d
Merge branch 'main' into merges/release/8.x-to-main
mmitche 5fb8ea4
Merge pull request #2032 from dotnet/merges/release/8.x-to-main
dotnet-bot 2c2d58c
Rename perf project to Arcade standard suffix 'PerformanceTests' (#2055)
ViktorHofer f58bc29
[main] Update dependencies from dotnet/roslyn (#2005)
dotnet-maestro[bot] c366f61
[main] Update dependencies from dotnet/arcade (#2056)
dotnet-maestro[bot] 98457c8
[main] Update dependencies from dotnet/source-build-externals (#2016)
dotnet-maestro[bot] 84b3d10
[main] Update dependencies from dotnet/runtime (#2015)
dotnet-maestro[bot] a58eac3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] eda92c2
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 4d2f4c5
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 0d1397d
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 5ee665c
[main] Update dependencies from dotnet/command-line-api (#2059)
dotnet-maestro[bot] 86e010f
Update dependencies from https://github.com/dotnet/source-build-exter…
dotnet-maestro[bot] 2e99b18
Update dependencies from https://github.com/dotnet/runtime build 2024…
dotnet-maestro[bot] 6cc40cb
[main] Update dependencies from dotnet/roslyn (#2065)
dotnet-maestro[bot] db7b254
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 15aa579
[main] Update dependencies from dotnet/arcade (#2070)
dotnet-maestro[bot] 0c424b6
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 2036958
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] ed49f9c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] a9b7ba7
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] af231fa
Flow live versions of Microsoft.Build and Microsoft.Build.Tasks.Core …
ellahathaway 62ad866
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] ac63bf9
[main] Update dependencies from dotnet/arcade (#2081)
dotnet-maestro[bot] 32d58a6
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 93f512a
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 7951dd1
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] e8f2449
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 1710ae3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] d102001
Move SB metadata to intermediates (#2090)
ellahathaway 6fe8c25
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] d73ee58
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 1733da0
[main] Update dependencies from dotnet/source-build-externals (#2078)
dotnet-maestro[bot] 1902d8c
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 4ffa2f1
[release/8.x] Update dependencies from dotnet/roslyn (#2017)
dotnet-maestro[bot] 1716d9e
[main] Update dependencies from dotnet/command-line-api (#2073)
dotnet-maestro[bot] fcce27f
[main] Update dependencies from dotnet/runtime (#2077)
dotnet-maestro[bot] 4480923
Clarify include/exclude parameter input format in readme (#2099)
riverar cbef833
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 49b4186
Merge branch 'release/8.x' into merges/release/8.x-to-main
jjonescz e07ea47
Merge pull request #2096 from dotnet/merges/release/8.x-to-main
dotnet-bot d8aa880
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] cc2d68b
Remove dependancy on EA.RazorCompiler
JoeRobich 2930a4f
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 578e193
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 7943195
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 8a1ad5c
Update dependencies from https://github.com/dotnet/source-build-exter…
dotnet-maestro[bot] 10d9ef7
Upgrade msbuild version
Cosifne 055aedb
Upgrade source build version
Cosifne ed0b618
Upgrade version in Version.Details.xml
Cosifne 124d3ab
Merge pull request #2102 from dotnet/darc-main-30682688-22d5-4b2a-9fd…
Cosifne 09e16d4
Merge remote-tracking branch 'upstream/main' into darc-main-6216b94f-…
Cosifne 7084790
Update baseline
Cosifne 7298c3b
Add versions in Version.Details.xml
Cosifne 3d40cb0
Add project url
Cosifne d4a428c
Remove Microsoft.VisualStudio.Setup.Configuration.Interop
Cosifne fd554ed
Merge pull request #2100 from dotnet/darc-main-6216b94f-a181-4ea1-9b0…
Cosifne 00c9d55
Update dependencies from https://github.com/dotnet/runtime build 2024…
dotnet-maestro[bot] 39b14d6
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 23065d6
Merge pull request #2104 from dotnet/darc-main-1f81f14c-fea6-4c71-85d…
Cosifne 17f057b
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] 42462b3
Update dependencies from https://github.com/dotnet/arcade build 20240…
dotnet-maestro[bot] 2001686
Fix CLI sln or proj argument name and description
dviererbe 30b66f0
Merge pull request #2108 from dviererbe/fix-sln-or-proj-argument-name…
JoeRobich 82edc54
Update dependencies from https://github.com/dotnet/roslyn build 20240…
dotnet-maestro[bot] 39d0f6e
Move documatations
Cosifne 9a1b718
Move perf tests to test folder
Cosifne b142675
Move unit tests
Cosifne 7b4f54b
Move src to src\dotnet-format
Cosifne 108e41a
Fix perf.ps1
Cosifne 92dd288
Move verifier and integration test to eng/dotnet-format
Cosifne c3a6bd4
Merge remote-tracking branch 'origin-format/dev/shech/mergeIntoSDK' i…
Cosifne 6e2a337
Address more conflicts
Cosifne 86e2b37
Move and create solution filter file
Cosifne 57a434f
Update reference
Cosifne a66faeb
Add to sln file
Cosifne 6c1cd9b
Update filter
Cosifne d0788f6
Put performance tests into a different folder because test folder has…
Cosifne d92bbf2
Only include the original test file
Cosifne 7dd7fc9
Change output type to exe so that xUnit console could be used
Cosifne 216849d
Update the publish target to directly copy from output folder
Cosifne 72cccc2
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne ac14992
Address unmerged conflicts
Cosifne 76731b5
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 178edae
More conflicts addressed
Cosifne f32c7a7
Remove duplicate signing
Cosifne 79f1120
remove duplicate in eng/Version.Details.xml
Cosifne f8037a4
Remove code of conduct
Cosifne 4372bfc
Move change log to dotnet format folder
Cosifne f8cb8ff
Remove .github/CODEOWNER and .github/fabricBot.json
Cosifne 095555e
Remove .config/tsaoptions.json
Cosifne c2bdfae
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 44b9292
Move test-plan and CHANGELOG to documentation
Cosifne 3d1cb61
Move Perf.cmd to eng/dotnet-format/Perf.cmd
Cosifne 4445d29
Remove ominishaprp.json
Cosifne 67356de
Move validate.rsp to eng/dotnet-format/validate.rsp
Cosifne a6edf40
Add test to UnitTests.proj
Cosifne c010cf5
Move azure-pipeline.*yml under eng/dotnet-format/
Cosifne 141b9e6
Remove .vscode/*
Cosifne 28420f0
Remove .devcontainer
Cosifne aa79eaa
Delete the azure-pipeline files, put the test job into one yml
Cosifne 0d56762
Remove .pre-commit-hooks.yaml
Cosifne 101bf6a
Remove Restore.cmd
Cosifne 98ec58c
Remove Build.cmd
Cosifne b5e4470
Remove Test.cmd
Cosifne eb86be7
Fix the path
Cosifne 56d41f0
Move test assets file to src/Asserts
Cosifne d99e30e
Include the test assets in test/UnitTests.proj
Cosifne cbfbfa0
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 3c5e6ca
Do not copy the test assets to output
Cosifne 10a3ab6
Exclude dotnet-format.TestProjects from build
Cosifne 887a4c8
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne f5d17b2
Fix build
Cosifne b3af336
Bring System.CommandLineRendering back
Cosifne 1f5a671
Add System.CommandLine.Rendering to source build baseline
Cosifne 5892829
Fix path of NuGet.config issue on Helix
Cosifne dc41c29
Use TestContext to locate TestAsserts
Cosifne 134c7a3
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne d88c65d
Find test assert directory from two places
Cosifne 9b6efdd
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne dd0c714
Add the missing assets
Cosifne 787379f
Rename
Cosifne 997d9b9
Explicitly add .editorconfig
Cosifne 8881805
Fix perf.ps1
Cosifne 85e83d2
Link dotnet format integration
Cosifne 1b2f40a
Chnage \ to /
Cosifne 947f099
Add code owners
Cosifne 82f325d
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 3f5d3f7
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 6f4599b
Reset .gitattributes
Cosifne 9d1292d
Remove benchmark
Cosifne bb64e43
Remove dotnet-format in Directory.Packages.props
Cosifne 5bf7bac
Remove benchmarkdotnet from Direcotry.Pacakge.props
Cosifne 8997f9f
Remove Changelog.md
Cosifne da74315
Remove perf.cmd and perf.ps1
Cosifne 2f278ba
Add NoLogo back
Cosifne d5e29e6
Use repo root
Cosifne 60b51a7
Change publish directory
Cosifne 2c517ad
Add NoLogo back in build.cmd
Cosifne 8615b80
Remove dotnet-format from Version.details
Cosifne 2342874
Use lower case in the name of build.ps1
Cosifne 1bac7f1
Remove BCL from version.details
Cosifne 2f966df
Increase timeout
Cosifne 0b1cbb6
Increase time limit
Cosifne 5b9c607
Source the dogfood.sh before test
Cosifne d28eced
Build before format
Cosifne b076b32
Try windows image
Cosifne 97540f4
Correct scirpt
Cosifne 1e032e9
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 69d7c19
Remove accidental added char
Cosifne 7d65caa
Try fix the format check
Cosifne 076f52d
Remove Intermediate.format
Cosifne 3ad5f39
Pipe the script
Cosifne bbbf57b
Restore test/Directory.Build.targets
Cosifne eb8e6c2
Add comment
Cosifne 3e70a96
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 2364425
Sort and remove usings for all the dotnet/format code
Cosifne 67ab69a
Remove test-plan
Cosifne 6797e2e
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 636ba11
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 86c6af4
Do not copy dotnet-format to output
Cosifne 8704b61
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne 50dfaa8
Remove assemblyResolver as it's no longer used
Cosifne fb74021
Use pattern to find dotnet-format dlls
Cosifne 735809a
Merge remote-tracking branch 'upstream/main' into dev/shech/mergeFormat
Cosifne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.NET Core uses third-party libraries or other resources that may be | ||
distributed under licenses different than the .NET Core software. | ||
|
||
In the event that we accidentally failed to list a required notice, please | ||
bring it to our attention. Post an issue or email us: | ||
|
||
[email protected] | ||
|
||
The attached notices are provided for information only. | ||
|
||
No notices are provided at this time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@echo off | ||
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0eng\common\build.ps1""" -build -restore %*" | ||
powershell -NoLogo -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\build.ps1""" -restore -build -msbuildEngine dotnet %*" | ||
exit /b %ErrorLevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# 3rd Party Analyzers | ||
|
||
## How to add analyzers to a project | ||
|
||
3rd party analyzers are discovered from the `<PackageReferences>` specified in the workspace project files. | ||
|
||
*Example:* | ||
|
||
Add the StyleCop analyzer package to a simple console project file. | ||
|
||
```diff | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
+ <ItemGroup> | ||
+ <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" /> | ||
+ </ItemGroup> | ||
|
||
</Project> | ||
``` | ||
|
||
## How to configure analyzer severity | ||
|
||
The options specified in .editorconfig files are recognized by the pattern `dotnet_diagnostic.<diagnostic-id>.severity = <value>`. `<diagnostic-id>` represents the diagnostic ID matched by the compiler, case-insensitively, to be configured. `<value>` must be one of the following: error, warn, info, hidden, suppress. Please read the [Code Analysis documentation](https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-options#severity-level) for more details. | ||
|
||
*Example:* | ||
|
||
Configure the StyleCop analyzer so that empty comments are errors. | ||
|
||
```ini | ||
[*.{cs,vb}] | ||
|
||
# The C# comment does not contain any comment text. | ||
dotnet_diagnostic.SA1120.severity = error | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Welcome to the dotnet-format docs! | ||
|
||
## .editorconfig options | ||
- [Supported .editorconfig options](./Supported-.editorconfig-options.md) | ||
|
||
## CLI options | ||
|
||
### Specify a workspace (Required) | ||
|
||
A workspace path is needed when running dotnet-format. By default, the current folder will be used as the workspace path. The workspace path and type of workspace determines which code files are considered for formatting. | ||
|
||
- Solutions and Projects - By default dotnet-format will open the workspace path as a MSBuild solution or project. | ||
- `--no-restore` - When formatting a solution or project the no restore option will stop dotnet-format from performing an implicit package restore. | ||
- `--folder` - When the folder options is specified the workspace path will be treated as a folder of code files. | ||
|
||
*Example:* | ||
|
||
Format the code files used in the format solution. | ||
|
||
```console | ||
dotnet format ./format.sln | ||
``` | ||
|
||
Format the code files used in the dotnet-format project. | ||
|
||
```console | ||
dotnet format ./src/dotnet-format.csproj | ||
``` | ||
|
||
Format the code files from the `./src` folder. | ||
|
||
```console | ||
dotnet format whitespace ./src --folder | ||
``` | ||
|
||
### Whitespace formatting | ||
|
||
Whitespace formatting includes the core .editorconfig settings along with the placement of spaces and newlines. The whitespace formatter is run by default when not running analysis. When only performing whitespace formatting, an implicit restore is not perfomed. When you want to run analysis and fix formatting issues you must specify both. | ||
|
||
Whitespace formatting run by default along with code-style and 3rd party analysis. | ||
|
||
```console | ||
dotnet format ./format.sln | ||
``` | ||
|
||
Running the whitespace formatter alone. | ||
|
||
```console | ||
dotnet format whitespace ./format.sln | ||
``` | ||
|
||
### Running analysis | ||
|
||
#### CodeStyle analysis | ||
|
||
Running codestyle analysis requires the use of a MSBuild solution or project file as the workspace. By default an implicit restore on the solution or project is performed. Enforces the .NET [Language conventions](https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions?view=vs-2019) and [Naming conventions](https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions?view=vs-2019). | ||
|
||
- `dotnet format style --severity <severity>` - Runs analysis and attempts to fix issues with severity equal or greater than specified. If severity is not specified then severity defaults to warning. | ||
|
||
*Example:* | ||
|
||
Code-style analysis is run by default along with whitespace formatting and 3rd party analysis. | ||
|
||
```console | ||
dotnet format ./format.sln | ||
``` | ||
|
||
Run code-style analysis alone against the dotnet-format project. | ||
|
||
```console | ||
dotnet format style ./src/dotnet-format.csproj --severity error | ||
``` | ||
|
||
Errors when used with the `--folder` option. Analysis requires a MSBuild solution or project. | ||
|
||
```console | ||
dotnet format style ./src --folder | ||
``` | ||
|
||
#### 3rd party analysis | ||
|
||
Running 3rd party analysis requires the use of a MSBuild solution or project file as the workspace. By default an implicit restore on the solution or project is performed. 3rd party analyzers are discovered from the `<PackageReferences>` specified in the workspace project files. | ||
|
||
- `dotnet format analyzers --severity <severity>` - Runs analysis and attempts to fix issues with severity equal or greater than specified. If no severity is specified then this defaults to warning. | ||
|
||
#### Filter diagnostics to fix | ||
|
||
Typically when running codestyle or 3rd party analysis, all diagnostics of sufficient severity are reported and fixed. The `--diagnostics` option allows you to target a particular diagnostic or set of diagnostics of sufficient severity. | ||
|
||
- `--diagnostics <diagnostic ids>` - When used in conjunction with `style` or `analyzer` subcommands, allows you to apply targeted fixes for particular analyzers. | ||
|
||
*Example:* | ||
|
||
Run code-style analysis and fix unused using directive errors. | ||
|
||
```console | ||
dotnet format style ./format.sln --diagnostics IDE0005 | ||
``` | ||
|
||
### Filter files to format | ||
|
||
You can further narrow the list of files to be formatted by specifying a list of paths to include or exclude. When specifying folder paths the path must end with a directory separator. File globbing is supported. | ||
|
||
- `--include` - A list of relative file or folder paths to include in formatting. | ||
- `--exclude` - A list of relative file or folder paths to exclude from formatting. | ||
|
||
*Example:* | ||
|
||
Other repos built as part of your project can be included using git submodules. These submodules likely contain their own .editorconfig files that are set as `root = true`. This makes it difficult to validate formatting for your project as formatting mistakes in submodules are treated as errors. | ||
|
||
The following command sets the repo folder as the workspace. It then includes the `src` and `tests` folders for formatting. The `submodule-a` folder is excluded from the formatting validation. | ||
|
||
```console | ||
dotnet format whitespace --folder --include ./src/ ./tests/ --exclude ./src/submodule-a/ --verify-no-changes | ||
``` | ||
|
||
### Logging and Reports | ||
|
||
- `--verbosity` - Set the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] | ||
- `--report` - Writes a json file to the given directory. Defaults to 'format-report.json' if no filename given. | ||
- `--binarylog` - Writes a [binary log file](https://msbuildlog.com/) to help in diagnosing solution or project load errors. Defaults to 'format.binlog' if no filename given. | ||
|
||
### Validate formatting | ||
|
||
- `--verify-no-changes` - Formats files without saving changes to disk. Terminates with a non-zero exit code (`2`) if any files were formatted. |
31 changes: 31 additions & 0 deletions
31
documentation/format/docs/Supported-.editorconfig-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Supported .editorconfig options | ||
The dotnet-format global tool supports the core set of [EditorConfig options](https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties)* as well as the [.NET coding convention settings for EditorConfig](https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019). | ||
|
||
## Core options | ||
- indent_style | ||
- indent_size | ||
- tab_width | ||
- end_of_line | ||
- charset | ||
- insert_final_newline | ||
- root | ||
|
||
[*] The options `trim_trailing_whitespace` and `max_line_length` are not supported. Currently insignificant whitespace is **always** removed by the formatter. | ||
|
||
## Removing unnecessary imports | ||
In order to remove unnecessary imports the IDE0005 (unnecessary import) diagnostic id must be configured in your .editorconfig. When running dotnet-format specify a severity that includes the configured IDE0005 severity. | ||
|
||
*Example:* | ||
|
||
.editorconfig | ||
```ini | ||
root = true | ||
|
||
[*.{cs,vb}] | ||
dotnet_diagnostic.IDE0005.severity = warning | ||
``` | ||
|
||
command | ||
```console | ||
dotnet format ./format.sln --severity warn | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Integrations | ||
Collection of advice how to auto check/format. Every sample expects dotnet format installed as local tool, unless otherwise noted. | ||
|
||
## Git pre-commit hook to reformat | ||
|
||
Create file `.git/hooks/pre-commit` with following contents: | ||
```sh | ||
#!/bin/sh | ||
LC_ALL=C | ||
# Select files to format | ||
FILES=$(git diff --cached --name-only --diff-filter=ACM "*.cs" | sed 's| |\\ |g') | ||
[ -z "$FILES" ] && exit 0 | ||
|
||
# Format all selected files | ||
echo "$FILES" | cat | xargs | sed -e 's/ /,/g' | xargs dotnet format --include | ||
|
||
# Add back the modified files to staging | ||
echo "$FILES" | xargs git add | ||
|
||
exit 0 | ||
|
||
``` | ||
|
||
These instructions originally authored by [randulakoralage82](https://medium.com/@randulakoralage82/format-your-net-code-with-git-hooks-a0dc33f68048). | ||
|
||
|
||
## Check on PR in Azure Dev Ops | ||
|
||
Add following to your build file: | ||
|
||
```yaml | ||
- task: UseDotNet@2 | ||
displayName: 'Use .NET 6 sdk' | ||
inputs: | ||
packageType: 'sdk' | ||
version: '6.0.x' | ||
includePreviewVersions: true | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet-format' | ||
inputs: | ||
command: 'custom' | ||
custom: 'format' | ||
arguments: '--verify-no-changes' | ||
``` | ||
|
||
These instructions originally authored by [leotsarev](https://github.com/joinrpg/joinrpg-net/). | ||
|
||
|
||
## [pre-commit.com](https://pre-commit.com/) hook to reformat | ||
|
||
Add the following block to the `repos` section of your `.pre-commit-config.yaml` file: | ||
|
||
```yaml | ||
- repo: https://github.com/dotnet/format | ||
rev: "" # Specify a tag or sha here, or run "pre-commit autoupdate" | ||
hooks: | ||
- id: dotnet-format | ||
``` | ||
Note that this will compile and install dotnet format to an isolated environment, using the system installation of the dotnet CLI. See the [pre-commit.com documentation](https://pre-commit.com/#dotnet) for more details. The problem is that dotnet format is using *preview* SDK (even for 5.x versions), and you have to install preview SDK on your machine for compiling it. Another option is to use local feature of pre-commit, as follows: | ||
|
||
```yaml | ||
- repo: local | ||
hooks: | ||
#Use dotnet format already installed on your machine | ||
- id: dotnet-format | ||
name: dotnet-format | ||
language: system | ||
entry: dotnet format --include | ||
types_or: ["c#", "vb"] | ||
``` | ||
|
||
These instructions originally authored by [rkm](https://github.com/rkm) & [leotsarev](https://github.com/joinrpg/joinrpg-net/). | ||
|
||
|
||
## Rider reformat on save | ||
|
||
1. Open Settings -> Tools -> File Watchers | ||
1. Press The “Plus Sign” to Add a Custom watcher | ||
1. Set the name to i.e. “dotnet format on save” | ||
1. FileType: C# | ||
1. Scope: Open Files | ||
1. Program: Write dotnet-format | ||
1. Arguments: $SolutionPath$ --verbosity diagnostic --include $FileRelativePath$ | ||
1. (Optionally) Append --fix-style warning to fix any style issues automatically on save. | ||
1. (Optionally) Append --fix-analyzers warning to fix any analyzer warnings on save. | ||
1. Disable all advanced option checkboxes. | ||
1. All other values were left default | ||
|
||
These instructions originally authored by [Nils Henrik Hals](https://strepto.github.io/Pause/blog/dotnet-format-rider/). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the docs of dotnet format are moved here.