Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow me to pass an .editorconfig file path into --config-path #1456

Closed
flagbug opened this issue Jan 22, 2025 · 1 comment · Fixed by #1460
Closed

Allow me to pass an .editorconfig file path into --config-path #1456

flagbug opened this issue Jan 22, 2025 · 1 comment · Fixed by #1460
Milestone

Comments

@flagbug
Copy link

flagbug commented Jan 22, 2025

Environments:

  • CSharpier Version: 0.30.6
  • Running CSharpier via: dotnet cli
  • Operating System: All
  • .csharpierrc Settings: any
  • .editorconfig Settings: any

Steps to reproduce:
Run dotnet csharpier --config-path ./path/to/editorconfig .

Expected behavior:

CSharpier uses the editorconfig file for configuration. The documentation states

CSharpier has support for a configuration file. You can use any of the following files

A .csharpierrc file in JSON or YAML.
A .csharpierrc.json or .csharpierrc.yaml file.
A .editorconfig file. See EditorConfig section below.

which is why I assumed this would be working

Actual behavior:

CSharpier throws an error: Unhandled exception: (Line: 1, Col: 1, Idx: 0) - (Line: 14, Col: 16, Idx: 214): Exception during deserialization


Not sure if this is even intended to work, I just assumed from the documentation. Feel free to close the issue if this is not an expected behavior!

@flagbug flagbug changed the title Allow me to pass .editorconfig into --config-path Allow me to pass an .editorconfig file path into --config-path Jan 22, 2025
@belav belav added this to the 0.31.0 milestone Jan 24, 2025
@belav
Copy link
Owner

belav commented Jan 24, 2025

I think this was just an oversight on my part when adding .editorconfig support which came after --config-path was already an option. It makes sense to add support for it. Not as straightforward as I originally hoped but things almost never are!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants