Skip to content

Commit

Permalink
Release 0.26.4 (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
belav authored Dec 2, 2023
1 parent 3e13cdc commit 133f698
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 2 deletions.
99 changes: 98 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,100 @@
# 0.26.3
# 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.
```c#
// 0.26.3
var a = new A { B = [1, 2, 3] };

List<string> items = [// My item
"Hello",];

items.AddRange(

[
LongValue________________________________________________,
LongValue________________________________________________
]
);

items = [];
items ??= [];

class SomeClass
{
public SomeValue SomeProperty =>

[
LongValue________________________________________________,
LongValue________________________________________________
];

public SomeValue Method() =>

[
LongValue________________________________________________,
LongValue________________________________________________
];
}

// 0.26.4
var a = new A { B = [1, 2, 3] };

List<string> items =
[
// My item
"Hello",
];

items.AddRange(
[
LongValue________________________________________________,
LongValue________________________________________________
]
);

items = [];
items ??= [];

class SomeClass
{
public SomeValue SomeProperty =>
[
LongValue________________________________________________,
LongValue________________________________________________
];

public SomeValue Method() =>
[
LongValue________________________________________________,
LongValue________________________________________________
];
}


```


Thanks go to @fgimian and @JoshWoodArup for reporting the issues
#### Usings sorting differs based on system culture [#1051](https://github.com/belav/csharpier/issues/1051)
The sorting of Usings was done in a culture specific manner, resulting in unexpected behavior.\
In Czech (cs-CZ) the `ch` is a "single letter" which is placed between `h` and `i`, which resulted in the following sorting behavior.
```c#
// 0.26.3
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.Channel;

// 0.26.4
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
```

Thanks go to @davidkudera for the contribution

**Full Changelog**: https://github.com/belav/csharpier/compare/0.26.3...0.26.4
# 0.26.3
## What's Changed
#### C#12 Collection expressions are prefixed with two spaces [#1009](https://github.com/belav/csharpier/issues/1009)
```c#
Expand Down Expand Up @@ -1540,3 +1636,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.3</Version>
<Version>0.26.4</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/belav/csharpier</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
14 changes: 14 additions & 0 deletions Src/Website/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ Dotnet tools can also be installed globally with the following command.
```bash
dotnet tool install -g csharpier
```

To update an existing installation of CSharpier, run the dotnet update command.

For local installations run the following command from the install directory.

```bash
dotnet tool update csharpier
```

For global installations run the following command from any location.

```bash
dotnet tool update csharpier -g
```

0 comments on commit 133f698

Please sign in to comment.