Skip to content

Bump csharpier from 1.3.0 to 1.4.2 - #431

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/dot-config/csharpier-1.4.2
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/dot-config/csharpier-1.4.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 29, 2026

Copy link
Copy Markdown
Contributor

Updated csharpier from 1.3.0 to 1.4.2.

Release notes

Sourced from csharpier's releases.

1.4.2

What's Changed

Feature: Show how many files format changed and list them with --list-formatted #​1931

The summary printed by format counted every file it read, so a second run printed the same count even when it changed nothing. The summary now also shows how many files were changed.

$ dotnet csharpier format .

# 1.4.1
Formatted 2 files in 120ms.

# 1.4.2
Formatted 2 files in 120ms (1 changed).

The new --list-formatted option prints the paths of the changed files, one per line, instead of the summary. Only errors are logged, and they go to stderr, so stdout contains nothing but the paths. It cannot be used with --write-stdout or when piping input to CSharpier.

$ dotnet csharpier format . --list-formatted
./src/Bar.cs
./src/Foo.cs

Fix: Extra blank lines around assembly attributes inside #if or #region #​1949

CSharpier added a blank line after an assembly attribute when a directive came next. In a file that also had a using directive and a type, the next run added a second blank line before #else, so check failed on the output of format.

// input & expected output
using System;

#if A
[assembly: SomeAttribute]
#else
[assembly: OtherAttribute]
#endif

class ClassName { }

// 1.4.1
using System;

#if A
[assembly: SomeAttribute]

#else
[assembly: OtherAttribute]

#endif

class ClassName { }

Fix: #else branch in a member chain loses its indentation #​1853

 ... (truncated)

## 1.4.1

## What's Changed
### Fix: Trailing lambda with an expression body that breaks is formatted badly [#​1941](https://github.com/belav/csharpier/issues/1941)
1.4.0 started keeping the arguments before a trailing lambda on the same line as the method name. When the lambda had an expression body that did not fit on one line, the body started on the same line as the `=>` and the closing parenthesis was not moved to its own line.
```c#
// input & expected output
CallMethod(one, x =>
    x == 1 ? "one"
    : x == 2 ? "two"
    : "three"
);

CallMethod(one, x =>
    from y in x
    group y by y.Key into g
    select new
    {
        g.Key.Id,
        g.Key.Alias,
        Count = g.Count(),
    }
);

// 1.4.0
CallMethod(one, x => x == 1 ? "one"
    : x == 2 ? "two"
    : "three");

CallMethod(one, x => from y in x group y by y.Key into g select new
    {
        g.Key.Id,
        g.Key.Alias,
        Count = g.Count(),
    });

Fix: Raw string literals are formatted inconsistently #​1940

A raw string literal assigned to a variable kept its opening quotes on the same line as the =. In other places, such as a lambda body, an expression bodied member, a property initializer or a cast, the opening quotes moved to the next line and the contents were indented one level further than the quotes. These cases are now formatted the same way as a variable.

// input & expected output
Func<int, string> lambda = _ => """
    SomeRawString
    """;

CallMethod(_ => """
    SomeRawString
    """
);

var cast = (object)"""
    SomeRawString
 ... (truncated)

## 1.4.0

## Breaking Changes
### Drop support for net8.0 and net9.0 [#​1888](https://github.com/belav/csharpier/issues/1888)
CSharpier and CSharpier.MsBuild now target `net10.0` and `net11.0`. CSharpier.Core targets `net10.0`, `net11.0` and `netstandard2.0`.

## What's Changed
### Feature: Support for .NET 11 and C# 15 [#​1888](https://github.com/belav/csharpier/issues/1888)
CSharpier now supports the new syntax in C# 15.
```c#
public union Pet(Cat, Dog, Bird);

public closed record GateState;

HashSet<string> set = [with(StringComparer.OrdinalIgnoreCase), "Hello", "HELLO", "hello"];

outer:
for (int row = 0; row < grid.Height; row++)
{
    for (int column = 0; column < grid.Width; column++)
    {
        if (grid[row, column].IsBlocked)
        {
            continue outer;
        }

        if (grid[row, column].IsGoal)
        {
            break outer;
        }
    }
}

Feature: Avoid chopping single trailing lambda #​1865

When the last argument is a lambda with a block body, and the arguments up to and including the => fit on one line, CSharpier now keeps them on the same line as the method name.

// input & expected output
logging.AddFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "server{0}.log"), o =>
{
    o.MaxRollingFiles = 1;
});

// 1.3.0
logging.AddFile(
    Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "server{0}.log"),
    o =>
    {
        o.MaxRollingFiles = 1;
    }
);

... (truncated)

1.3.11-beta1

1.3.6

1.3.6

What's Changed

Fix bug where 2nd instance of VSCode was not able to format code #​784

Thanks to @​BenasB for reporting the issue

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: csharpier
  dependency-version: 1.4.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants