Support an option like --stdin-filepath
When CSharpier formats a file from stdin, it considers the current directory to be the location of the file for purposes of finding a config file and ignore file.
We should add an option --stdin-filepath
This will be considered the location of the file for purposes of finding the config file and the ignore file.
Closing for lack of interest
This is still relevant for emacs , especially when used within apheleia.
Also relevant to format files other than .cs files. Right now, trying to format a .csproj file through stdin results in errors, seemingly because csharpier can't determine the file type.
❯ dotnet csharpier format < src/API/API.csproj
Error /home/color/projects/lectio/edula/apps/api - Failed to compile so was not formatted.
(1,1): error CS1525: Invalid expression term '<'
(1,10): error CS1002: ; expected
...
ok this is closed. I am not sure, was there a new feature implemented? How does it work? I clicked through to the other issue, there's no documentation or explanation there either.
This was implemented and will be available in 1.1.0. The documentation for how it will work is at https://github.com/belav/csharpier/pull/1665/files#diff-7340b8a6d2c5b52c935f75ec72038d28b8c606323ea41bd29ced4b521eae7761