Skip to content

Commit

Permalink
Releasing 0.26.5
Browse files Browse the repository at this point in the history
  • Loading branch information
belav committed Dec 10, 2023
1 parent bef05ab commit a503b72
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 12 deletions.
77 changes: 76 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@
# 0.26.4
# 0.26.5
## What's Changed
### 0.26.4 sorts `NSubstitute` before `Newtonsoft.Json` [#1061](https://github.com/belav/csharpier/issues/1061)
The using sorting in `0.26.4` was taking into account case.

```c#
// 0.26.4
using System;
using NSubstitute;
using Newtonsoft.Json;

// 0.26.5
using System;
using Newtonsoft.Json;
using NSubstitute;
```

Thanks go to @loraderon for contributing the fix.

### Extra newline added when using a collection expression with { get; } [#1063](https://github.com/belav/csharpier/issues/1063)
A collection expression in a property initializer was including an extra new line.
```c#
// 0.26.4
public class ClassName
{
public List<DayOfWeek> DaysOfWeek { get; } =

[
DayOfWeek.Sunday,
// snip
DayOfWeek.Saturday
];
}

// 0.26.5
public class ClassName
{
public List<DayOfWeek> DaysOfWeek { get; } =
[
DayOfWeek.Sunday,
// snip
DayOfWeek.Saturday
];
}
```
Thanks go to @SapiensAnatis for contributing the fix.

### Comments at the end of a collection expression should be indented [#1059](https://github.com/belav/csharpier/issues/1059)
When the close bracket on a collection expression had a leading comment, it had the same indentation as the bracket.
```c#
// 0.26.4
host.AddSection(
name: "Kontakt Libraries (Third Party)",
tags: Tags.SamplesUsed,
tasks:
[
// TODO: Add any used third party instruments below as you discover them.
]
);

// 0.26.5
host.AddSection(
name: "Kontakt Libraries (Third Party)",
tags: Tags.SamplesUsed,
tasks:
[
// TODO: Add any used third party instruments below as you discover them.
]
);
```

Thanks go to @fgimian for reporting the problem

**Full Changelog**: https://github.com/belav/csharpier/compare/0.26.4...0.26.5
# 0.26.4
## What's Changed
### Spacing bugs related to C#12 collection expressions [#1049](https://github.com/belav/csharpier/issues/1049) [#1047](https://github.com/belav/csharpier/issues/1047)
There were a number of cases where CSharpier was including extra blank lines, an extra space, or not formatting contents of collection expressions.
Expand Down Expand Up @@ -1637,3 +1711,4 @@ Thanks go to @pingzing
2 changes: 1 addition & 1 deletion Nuget/Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.26.4</Version>
<Version>0.26.5</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/belav/csharpier</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion Shell/ReviewBranch.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function CSH-ReviewBranch {
if ($firstRun) {
# uses https://github.com/github/hub/releases
# if this hangs run a command against this repo outside of here, it will store
# a token. Or I can just have a way to pass a GITHUB_TOKEN or store it in a .env
# a token. Or I can just have a way to pass a GITHUB_TOKEN or store it in a .envc
$newPr = & hub pull-request -b belav:$preBranch -m "Testing $branch $folder"
Write-Output $newPr
}
Expand Down
18 changes: 9 additions & 9 deletions Src/Website/docs/EditorsTroubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Troubleshooting
hide_table_of_contents: true
---

The editor extensions run CSharpier to facilitate format files.
CSharpier is kept running to speed up formatting results.
The editor extensions run CSharpier to facilitate format files.
CSharpier is kept running to speed up formatting results.
The extensions install CSharpier to a custom path to avoid commands like `dotnet tool update -g csharpier` failing because a CSharpier is running.

When the extension is unable to format files, it is generally a problem with being unable to install or execute the extension. You can use the information from the logs it outputs to understand the failure and then attempt the troubleshooting steps below.
Expand All @@ -15,12 +15,12 @@ When the extension is unable to format files, it is generally a problem with bei
- Change `Log Debug Messages` to `true`

### VSCode
- Navigate to `File - Preferences - Settings - Extensions - CSharpier`
- Navigate to `File - Preferences - Settings - Extensions - CSharpier`
- Check `Enable debug logs`
- Restart VSCode

### Rider
- Execute the action `Debug Log Settings`
- Execute the action `Debug Log Settings`
- Add an entry for `#com.intellij.csharpier.CSharpierLogger`
- Restart Rider

Expand All @@ -41,12 +41,12 @@ When the extension is unable to format files, it is generally a problem with bei
The following can help track down issues with the extension being unable to install/run CSharpier

1. Validate the following command can run in the directory of your project<br/>
`dotnet csharpier --version`
`dotnet csharpier --version`
2. If the extension was able to install CSharpier it should exist at a path such as<br/>
`C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or<br/>
`$Home/.cache/csharpier/[CSharpierVersion]`
`C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or<br/>
`$Home/.cache/csharpier/[CSharpierVersion]`
3. Assuming the directory above exists, attempt to run the following in that directory<br/>
`dotnet-csharpier --version`
`dotnet-csharpier --version`
4. If the installation appears to be corrupt, delete the directory and install CSharpier there yourself<br/>
`dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]`
`dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]`
5. Repeat step 3 to validate the install

0 comments on commit a503b72

Please sign in to comment.