Skip to content

Commit e61f38d

Browse files
committed
Merge branch 'main' into csproj-formatting
2 parents e51834d + fa57850 commit e61f38d

35 files changed

+1687
-130
lines changed

.github/workflows/deploy_website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Deploy Website
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ main ]
55
paths:
66
- 'Src/Website/**'
77

.github/workflows/format_repositories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Format Repositories
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ main ]
55
paths:
66
- "Src/CSharpier/**/*"
77

.github/workflows/publish_nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish Nuget
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ main ]
55
jobs:
66
test:
77
runs-on: ubuntu-latest

.github/workflows/validate_pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Validate Pull Request
22
on:
33
pull_request:
4-
branches: [ master ]
4+
branches: [ main ]
55
jobs:
66
run_tests:
77
runs-on: ubuntu-latest

CSharpier.VisualStudio/.idea/.idea.CSharpier.VisualStudio/.idea/indexLayout.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

CSharpier.VisualStudio/.idea/.idea.CSharpier.VisualStudio/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Docs/CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ This option keeps csharpier running so that multiple files can be formatted. Thi
112112
to drastically improve formatting time.
113113
The input is a '\u0003' delimited list of file names followed by file contents.
114114
The results are written to stdout delimited by \u0003.
115-
For an example of implementing this in code see [this example](https://github.com/belav/csharpier/blob/master/Src/CSharpier.VSCode/src/CSharpierProcessPipeMultipleFiles.ts)
115+
For an example of implementing this in code see [this example](https://github.com/belav/csharpier/blob/main/Src/CSharpier.VSCode/src/CSharpierProcessPipeMultipleFiles.ts)
116116
```bash
117117
$ [FullPathToFile]\u0003[FileContents]\u0003[FullPathToFile]\u0003[FileContents]\u0003 | dotnet csharpier --pipe-multiple-files
118118
public class ClassName

Docs/ContinuousIntegration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Normally when using a code formatter like CSharpier, you'll want to ensure that
2929
name: Validate PR
3030
on:
3131
pull_request:
32-
branches: [ master ]
32+
branches: [ main ]
3333
jobs:
3434
check_formatting:
3535
runs-on: ubuntu-latest

Scripts/ReviewBranchOnCSharpierRepos.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ $ErrorActionPreference = "Stop"
1818

1919
$branch = & git branch --show-current
2020

21-
if ($branch -eq "master") {
22-
Write-Output "You must be on the branch you want to test. You are currently on master"
21+
if ($branch -eq "main") {
22+
Write-Output "You must be on the branch you want to test. You are currently on main"
2323
exit 1
2424
}
2525

@@ -42,7 +42,7 @@ if ($firstRun)
4242
{
4343
Set-Location $repositoryRoot
4444
# TODO this should make sure the working tree is clean
45-
& git checkout master
45+
& git checkout main
4646
Build-CSharpier
4747

4848
Set-Location $pathToTestingRepo
@@ -52,6 +52,10 @@ if ($firstRun)
5252
& git checkout -b $preBranch
5353

5454
dotnet $csharpierDllPath . $fastParam --no-cache
55+
# there is some weirdness with a couple files with #if where
56+
# they need to be formatted twice to get them stable
57+
# it isn't worth fixing in csharpier, because it only really affects this
58+
dotnet $csharpierDllPath . $fastParam
5559

5660
& git add -A
5761
& git commit -m "Before $branch"

Src/CSharpier.Cli/CommandLineFormatter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ CancellationToken cancellationToken
355355

356356
try
357357
{
358-
codeFormattingResult = await CodeFormatter.FormatAsync(
358+
// TODO xml find correct formatter
359+
codeFormattingResult = await CSharpFormatter.FormatAsync(
359360
fileToFormatInfo.FileContents,
360361
Path.GetExtension(fileToFormatInfo.Path),
361362
printerOptions,

0 commit comments

Comments
 (0)