Skip to content

Commit d754703

Browse files
authored
Release 0.28.0 (#1223)
1 parent 5013141 commit d754703

File tree

2 files changed

+120
-2
lines changed

2 files changed

+120
-2
lines changed

CHANGELOG.md

Lines changed: 119 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,121 @@
1-
# 0.27.3
1+
# 0.28.0
2+
## What's Changed
3+
### Fix dedented method call if there is a long chain [#1154](https://github.com/belav/csharpier/issues/1154)
4+
In some cases of method chains, the first invocation would end up dedented.
5+
6+
```c#
7+
// 0.27.3
8+
o.Property.CallMethod(
9+
someParameter_____________________________,
10+
someParameter_____________________________
11+
)
12+
.CallMethod()
13+
.CallMethod();
14+
15+
// 0.28.0
16+
o.Property.CallMethod(
17+
someParameter_____________________________,
18+
someParameter_____________________________
19+
)
20+
.CallMethod()
21+
.CallMethod();
22+
```
23+
### Extra newline in switch case statement with curly braces [#1192](https://github.com/belav/csharpier/issues/1192
24+
If a case statement started with a block it would get an extra new line
25+
```c#
26+
// 0.27.3
27+
switch (someValue)
28+
{
29+
case 0:
30+
{
31+
// dedented because the only statement is a block
32+
break;
33+
}
34+
35+
case 1:
36+
37+
{
38+
// indented because there are two statements, a block then a break
39+
}
40+
break;
41+
}
42+
43+
// 0.28.0
44+
// 0.27.3
45+
switch (someValue)
46+
{
47+
case 0:
48+
{
49+
// dedented because the only statement is a block
50+
break;
51+
}
52+
53+
case 1:
54+
{
55+
// indented because there are two statements, a block then a break
56+
}
57+
break;
58+
}
59+
```
60+
61+
Thanks go to @emberTrev for reporting the bug.
62+
63+
### Handle more editorconfig glob patterns. [#1214](https://github.com/belav/csharpier/issues/1214)
64+
The editorconfig parsing was not handling glob patterns that contained braces.
65+
```editorconfig
66+
# worked in 0.27.3
67+
[*.cs]
68+
indent_size = 4
69+
tab_width = 4
70+
71+
# did not work in 0.27.3
72+
[*.{cs,csx}]
73+
indent_size = 4
74+
tab_width = 4
75+
76+
# did not work in 0.27.3
77+
[*.{cs}]
78+
indent_size = 4
79+
tab_width = 4
80+
```
81+
82+
Thanks go to @kada-v for reporting the bug
83+
84+
### Ignore-start combined with regions throws exception [#1197](https://github.com/belav/csharpier/issues/1197)
85+
The following code would throw an exception, it is now working as expected.
86+
```c#
87+
class ClassName
88+
{
89+
#region Region
90+
// csharpier-ignore-start
91+
public string Field;
92+
// csharpier-ignore-end
93+
#endregion
94+
}
95+
```
96+
Thanks go to @davidescapolan01 for reporting the bug
97+
98+
### Cannot format project containing editorconfig [#1194](https://github.com/belav/csharpier/issues/1194)
99+
On some OSs the following would cause an exception.
100+
```bash
101+
dotnet new console -n foo
102+
cd foo
103+
dotnet new editorconfig
104+
dotnet csharpier ./
105+
```
106+
107+
Thanks go to @hashitaku for contributing the fix.
108+
109+
### Expose IncludeGenerated in CodeFormatterOptions [#1215](https://github.com/belav/csharpier/issues/1215)
110+
`CodeFormatterOptions.IncludeGenerated` is now available for the SDK.
111+
112+
### Returning errors + status from csharpier http server [#1191](https://github.com/belav/csharpier/pull/1191)
113+
Improved the http server that CSharpier will soon use to facilitate formatting by plugins. The formatting request now returns errors and a status for each file formatted.
114+
This allows the plugin to provide more information to the user when they attempt to format a file. The plugins will be updated to use the http server option for CSharpier 0.28.0+
115+
116+
117+
**Full Changelog**: https://github.com/belav/csharpier/compare/0.27.3...0.28.0
118+
# 0.27.3
2119
## What's Changed
3120
### Add more options to CodeFormatterOptions [#1172](https://github.com/belav/csharpier/issues/1172)
4121
The API for CSharpier was only exposing `CodeFormatterOptions.PrintWidth`. It is now in sync with the CLI and exposes all of the available options
@@ -2220,3 +2337,4 @@ Thanks go to @pingzing
22202337
22212338
22222339
2340+

Nuget/Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>0.27.3</Version>
3+
<Version>0.28.0</Version>
44
<PackageLicenseExpression>MIT</PackageLicenseExpression>
55
<RepositoryUrl>https://github.com/belav/csharpier</RepositoryUrl>
66
<RepositoryType>git</RepositoryType>

0 commit comments

Comments
 (0)