Skip to content

Bump csharpier from 0.30.6 to 1.0.1#298

Merged
guibranco merged 8 commits intomainfrom
dependabot/nuget/csharpier-1.0.1
May 8, 2025
Merged

Bump csharpier from 0.30.6 to 1.0.1#298
guibranco merged 8 commits intomainfrom
dependabot/nuget/csharpier-1.0.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 28, 2025

Bumps csharpier from 0.30.6 to 1.0.1.

Release notes

Sourced from csharpier's releases.

1.0.1

What's Changed

CSharpier's support for .gitignore is causing performance issues #1584

The support for .gitignore has some major performance problems when there are a large number of .gitignore files and/or ignore rules. The feature has been disabled for now until it can be fixed.

CSharpier.MsBuild issues #1586

CSharpier.MsBuild was not properly logging errors when performing a formatting check. This would result in the build passing when files were not formatted. Setting CSharpier_LogLevel was passing an invalid parameter of --loglevel to CSharpier, resulting in a build failure

Full Changelog: belav/csharpier@1.0.0...1.0.1

1.0.0

Major Changes

Support for formatting XML #819

CSharpier now formats xml files by default. It will try to format ".csproj", ".props", ".targets", ".xml", ".config" as if they were xml.
If a file is not valid xml it will be treated as a warning.
The default indent size is 2 instead of 4

Performance Improvements

@​TimothyMakkison put a lot of effort into improving the performance of CSharpier. These benchmark numbers show drastic improvement for both speed and memory usage.

Baseline

| Method                        | Mean     | Error   | StdDev  | Median   | Gen0       | Gen1      | Gen2      | Allocated |
|------------------------------ |---------:|--------:|--------:|---------:|-----------:|----------:|----------:|----------:|
| Default_CodeFormatter_Tests   | 233.3 ms | 4.63 ms | 8.23 ms | 229.7 ms | 11000.0000 | 4000.0000 | 1000.0000 | 101.41 MB |
| Default_CodeFormatter_Complex | 433.7 ms | 8.53 ms | 7.56 ms | 433.4 ms | 20000.0000 | 5000.0000 | 1000.0000 | 182.44 MB |

After Improvements

| Method                        | Mean      | Error    | StdDev   | Gen0      | Gen1      | Allocated |
|------------------------------ |----------:|---------:|---------:|----------:|----------:|----------:|
| Default_CodeFormatter_Tests   |  64.72 ms | 0.548 ms | 0.512 ms | 1666.6667 | 1000.0000 |  18.33 MB |
| Default_CodeFormatter_Complex | 137.83 ms | 2.730 ms | 4.708 ms | 3000.0000 | 1000.0000 |  30.78 MB |

Breaking Changes

ConfigurationFile - rename TabWidth to IndentSize #1377

In order to get consistency between an .editorconfig and .csharpierconfig the option TabWidth has been renamed to IndentSize. This is also a more accurate name considering by default indentation is done with spaces and not tabs.

Rework the CLI to use commands and arguments. #1321

The CLI has been reworked to use commands. This helps make it clear which arguments apply to which commands. The two common commands are below, see https://csharpier.com/docs/CLI for more details.

dotnet csharpier format .
dotnet csharpier check .

Changing the tool command to csharpier. Changing the assembly/exe to CSharpier #1418

Prior to 1.0.0 the tool command was dotnet-csharpier and assembly/exe were named dotnet_csharpier. The tool command name was changed to just csharpier

  • Running a local tool remains the same dotnet csharpier --version

... (truncated)

Changelog

Sourced from csharpier's changelog.

1.0.1

What's Changed

CSharpier's support for .gitignore is causing performance issues #1584

The support for .gitignore has some major performance problems when there are a large number of .gitignore files and/or ignore rules. The feature has been disabled for now until it can be fixed.

CSharpier.MsBuild issues #1586

CSharpier.MsBuild was not properly logging errors when performing a formatting check. This would result in the build passing when files were not formatted.
Setting CSharpier_LogLevel was passing an invalid parameter of --loglevel to CSharpier, resulting in a build failure

Full Changelog: belav/csharpier@1.0.0...1.0.1

1.0.0

Major Changes

Support for formatting XML #819

CSharpier now formats xml files by default. It will try to format ".csproj", ".props", ".targets", ".xml", ".config" as if they were xml.
If a file is not valid xml it will be treated as a warning.
The default indent size is 2 instead of 4

Performance Improvements

@​TimothyMakkison put a lot of effort into improving the performance of CSharpier. These benchmark numbers show drastic improvement for both speed and memory usage.

Baseline

| Method                        | Mean     | Error   | StdDev  | Median   | Gen0       | Gen1      | Gen2      | Allocated |
|------------------------------ |---------:|--------:|--------:|---------:|-----------:|----------:|----------:|----------:|
| Default_CodeFormatter_Tests   | 233.3 ms | 4.63 ms | 8.23 ms | 229.7 ms | 11000.0000 | 4000.0000 | 1000.0000 | 101.41 MB |
| Default_CodeFormatter_Complex | 433.7 ms | 8.53 ms | 7.56 ms | 433.4 ms | 20000.0000 | 5000.0000 | 1000.0000 | 182.44 MB |

After Improvements

| Method                        | Mean      | Error    | StdDev   | Gen0      | Gen1      | Allocated |
|------------------------------ |----------:|---------:|---------:|----------:|----------:|----------:|
| Default_CodeFormatter_Tests   |  64.72 ms | 0.548 ms | 0.512 ms | 1666.6667 | 1000.0000 |  18.33 MB |
| Default_CodeFormatter_Complex | 137.83 ms | 2.730 ms | 4.708 ms | 3000.0000 | 1000.0000 |  30.78 MB |

Breaking Changes

ConfigurationFile - rename TabWidth to IndentSize #1377

In order to get consistency between an .editorconfig and .csharpierconfig the option TabWidth has been renamed to IndentSize. This is also a more accurate name considering by default indentation is done with spaces and not tabs.

Rework the CLI to use commands and arguments. #1321

The CLI has been reworked to use commands. This helps make it clear which arguments apply to which commands. The two common commands are below, see https://csharpier.com/docs/CLI for more details.

dotnet csharpier format .
dotnet csharpier check .

Changing the tool command to csharpier. Changing the assembly/exe to CSharpier #1418

Prior to 1.0.0 the tool command was dotnet-csharpier and assembly/exe were named dotnet_csharpier. The tool command name was changed to just csharpier

  • Running a local tool remains the same dotnet csharpier --version
  • Running a global tool is changed to csharpier --version

... (truncated)

Commits

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 merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @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)

Summary by Sourcery

Build:

  • Update the csharpier version in the dotnet tools manifest.

Description by Korbit AI

What change is being made?

Update the csharpier tool from version 0.30.6 to 1.0.1, and revise associated GitHub Actions to use updated and improved workflows for secrets checking and linter functionality.

Why are these changes being made?

Updating to csharpier version 1.0.1 ensures compatibility with the latest features and improvements, addressing bugs or issues present in earlier versions. The revised GitHub Actions make use of the latest marketplace actions, simplifying and optimizing the CI/CD process for better efficiency and maintainability. The LabelMercadoLivre class has been sealed for improved performance and security. Additional code cleanup and whitespace adjustments have been made for consistency and readability.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Bumps [csharpier](https://github.com/belav/csharpier) from 0.30.6 to 1.0.1.
- [Release notes](https://github.com/belav/csharpier/releases)
- [Changelog](https://github.com/belav/csharpier/blob/main/CHANGELOG.md)
- [Commits](belav/csharpier@0.30.6...1.0.1)

---
updated-dependencies:
- dependency-name: csharpier
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@korbit-ai
Copy link
Copy Markdown

korbit-ai Bot commented Apr 28, 2025

By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the /korbit-review command in a comment.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 28, 2025

Reviewer's Guide by Sourcery

This pull request updates the version of the csharpier .NET tool to 1.0.1 by modifying the .config/dotnet-tools.json file. This update includes several new features, performance improvements, and breaking changes introduced in version 1.0.0, as well as fixes from version 1.0.1.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated to CSharpier 1.0.0, which includes significant changes and breaking changes.
  • Added support for formatting XML files (.csproj, .props, .targets, .xml, .config) with a default indent size of 2 spaces.
  • Introduced significant performance improvements.
  • Renamed the configuration option TabWidth to IndentSize.
  • Reworked the command-line interface (CLI) to use commands and arguments (e.g., dotnet csharpier format ., dotnet csharpier check .).
  • Changed the tool command name from dotnet-csharpier to csharpier.
.config/dotnet-tools.json
Updated to CSharpier 1.0.1, which includes bug fixes.
  • Disabled support for .gitignore files due to performance issues.
  • Fixed issues with CSharpier.MsBuild not properly logging errors and passing an invalid parameter for log level.
.config/dotnet-tools.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Join our Discord community for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@guibranco guibranco enabled auto-merge (squash) April 28, 2025 09:24
@gstraccini gstraccini Bot added the ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) label Apr 28, 2025
Copy link
Copy Markdown
Member

@guibranco guibranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically approved by gstraccini[bot]

@gstraccini gstraccini Bot added the 🤖 bot Automated processes or integrations label Apr 28, 2025
@guibranco
Copy link
Copy Markdown
Member

@dependabot squash and merge

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 28, 2025
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Apr 28, 2025

One of your CI runs failed on this pull request, so Dependabot won't merge it.

Dependabot will still automatically merge this pull request if you amend it and your tests pass.

@github-actions github-actions Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 8, 2025
@guibranco
Copy link
Copy Markdown
Member

@gstraccini csharpier

@gstraccini
Copy link
Copy Markdown
Contributor

gstraccini Bot commented May 8, 2025

Running CSharpier on this branch! 🔧

@gstraccini
Copy link
Copy Markdown
Contributor

gstraccini Bot commented May 8, 2025

CSharpier result:

Error ./Directory.Build.props - Was not formatted.
  ----------------------------- Expected: Around Line 2 -----------------------------
  <Project>
    <PropertyGroup>
      <LangVersion>latest</LangVersion>
  ----------------------------- Actual: Around Line 2 -----------------------------
  <Project>
  
    <PropertyGroup>
  
Error ./Tests/EditoraInovacao.Sankhya.Entities.Tests/EditoraInovacao.Sankhya.Entities.Tests.csproj - Was not formatted.
  ----------------------------- Expected: Around Line 8 -----------------------------
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="coverlet.msbuild" Version="6.0.4">
  ----------------------------- Actual: Around Line 8 -----------------------------
    </PropertyGroup>
  
    <ItemGroup>
  
Error ./Src/EditoraInovacao.Sankhya.Entities/EditoraInovacao.Sankhya.Entities.csproj - Was not formatted.
  ----------------------------- Expected: Around Line 2 -----------------------------
  <Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
      <TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
  ----------------------------- Actual: Around Line 2 -----------------------------
  <Project Sdk="Microsoft.NET.Sdk">
  
    <PropertyGroup>
  
Error ./Src/EditoraInovacao.Sankhya.Entities/Transport/Store.cs - Was not formatted.
  ----------------------------- Expected: Around Line 15 -----------------------------
  
  using System;
  using System.ComponentModel;
  ----------------------------- Actual: Around Line 15 -----------------------------
  
  
  using System;
  
Error ./Src/EditoraInovacao.Sankhya.Entities/Transport/LabelMercadoLivre.cs - Was not formatted.
  ----------------------------- Expected: Around Line 359 -----------------------------
      /// <value>The date</value>
      [EntityElement("DATA")]
      public DateTime Date
  ----------------------------- Actual: Around Line 359 -----------------------------
      /// <value>The date</value>
  
      [EntityElement("DATA")]
  
Formatted 50 files in 924ms.

gstraccini Bot and others added 2 commits May 8, 2025 18:20
Resolved issues in Src/EditoraInovacao.Sankhya.Entities/Transport/LabelMercadoLivre.cs with DeepSource Autofix
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2025

Infisical secrets check: ✅ No secrets leaked!

💻 Scan logs
6:49PM INF scanning for exposed secrets...
6:49PM INF 231 commits scanned.
6:49PM INF scan completed in 223ms
6:49PM INF no leaks found

@guibranco
Copy link
Copy Markdown
Member

@gstraccini codacy bypass

@gstraccini
Copy link
Copy Markdown
Contributor

gstraccini Bot commented May 8, 2025

Bypassing the Codacy analysis for this pull request! ⚠️

@guibranco guibranco merged commit 4b1d8a0 into main May 8, 2025
21 of 22 checks passed
@guibranco guibranco deleted the dependabot/nuget/csharpier-1.0.1 branch May 8, 2025 22:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2025

Infisical secrets check: ✅ No secrets leaked!

💻 Scan logs
Update Required: Your current package installation script is outdated and will no longer receive updates.
Please update to the new installation script which can be found here https://infisical.com/docs/cli/overview#installation debian section

A new release of infisical is available: 0.38.0 -> 0.41.1

To update, run: sudo apt-get update && sudo apt-get install infisical

11:02PM INF scanning for exposed secrets...
11:02PM INF 229 commits scanned.
11:02PM INF scan completed in 208ms
11:02PM INF no leaks found

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

Labels

☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) 🤖 bot Automated processes or integrations dependencies .NET nuget size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant