-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ref/subcommands
- Loading branch information
Showing
41 changed files
with
423 additions
and
98 deletions.
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# running this seems to screw up the nuget restore, but provides a way to figure out why a test is failing on linux while working on windows. | ||
# you have to run this from the root, IE powershell ./Scripts/RunLinuxTests.ps1 | ||
# also a lot of these tests fail due to line endings in your local files being \r\n but the writeLine using \n | ||
docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app/tests mcr.microsoft.com/dotnet/sdk:7.0 dotnet test /app/Src/CSharpier.Tests/CSharpier.Tests.csproj --logger:trx | ||
docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app/tests mcr.microsoft.com/dotnet/sdk:9.0 dotnet test /app/Src/CSharpier.Tests/CSharpier.Tests.csproj --logger:trx | ||
|
||
# gross way to run csharpier against the csharpier-repos | ||
#docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app mcr.microsoft.com/dotnet/sdk:5.0 dotnet ./csharpier/Src/CSharpier/bin/Debug/net6.0/dotnet-csharpier.dll csharpier-repos --skip-write | ||
#docker run --rm -v ${pwd}:/app -e "NormalizeLineEndings=1" -w /app mcr.microsoft.com/dotnet/sdk:9.0 dotnet ./csharpier/Src/CSharpier/bin/Debug/net9.0/dotnet-csharpier.dll csharpier-repos --skip-write |
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,24 @@ | ||
function CSH-PublishVS { | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[string]$accessToken | ||
) | ||
|
||
$repositoryRoot = Join-Path $PSScriptRoot ".." | ||
$vsRoot = Join-Path $repositoryRoot "/Src/CSharpier.VisualStudio" | ||
|
||
$vsixPath = "C:\Program Files\Microsoft Visual Studio\2022\Professional\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" | ||
|
||
& $vsixPath publish ` | ||
-payload $vsRoot/CSharpier.VisualStudio/bin/Release/CSharpier.VisualStudio.vsix ` | ||
-publishManifest $vsRoot/manifest.json ` | ||
-personalAccessToken $accessToken | ||
|
||
& $vsixPath publish ` | ||
-payload $vsRoot/CSharpier.VisualStudio2019/bin/Release/CSharpier.VisualStudio2019.vsix ` | ||
-publishManifest $vsRoot/manifest2019.json ` | ||
-personalAccessToken $accessToken | ||
|
||
} | ||
|
||
Export-ModuleMember -Function CSH-* |
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
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
9 changes: 9 additions & 0 deletions
9
Src/CSharpier.Tests/FormattingTests/TestFiles/cs/AllowsRefStruct.test
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,9 @@ | ||
public class C<T> | ||
where T : allows ref struct | ||
{ | ||
// Use T as a ref struct: | ||
public void M(scoped T p) | ||
{ | ||
// The parameter p must follow ref safety 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
19 changes: 19 additions & 0 deletions
19
...CSharpier.Tests/FormattingTests/TestFiles/cs/TrailingComma_TrailingComments.expected.test
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,19 @@ | ||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = 2, // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [], // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = | ||
[ /* this formatting isn't ideal, but this probably won't happen in the real world */ | ||
], // Trailing Comment | ||
}; |
17 changes: 17 additions & 0 deletions
17
Src/CSharpier.Tests/FormattingTests/TestFiles/cs/TrailingComma_TrailingComments.test
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,17 @@ | ||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = 2 // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [] // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [/* this formatting isn't ideal, but this probably won't happen in the real world */ ] // Trailing Comment | ||
}; |
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
10 changes: 5 additions & 5 deletions
10
Src/CSharpier.VisualStudio/CSharpier.VisualStudio/source.extension.vsixmanifest
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
4 changes: 2 additions & 2 deletions
4
Src/CSharpier.VisualStudio/CSharpier.VisualStudio2019/source.extension.vsixmanifest
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
Oops, something went wrong.