4 ms·
I wish there was good C# one (and ideally a standard one like go). When switching between typescript with prettier and C# the first thing I notice is the lack o
by Guillaume86 6y ago
I wish there was good C# one (and ideally a standard one like go). When switching between typescript with prettier and C# the first thing I notice is the lack of autoformating.
edit: seems https://github.com/dotnet/format https://github.com/dotnet/format is the closest thing
- sethreno 6y agoI wish their was a standard c# formatter too. dotnet-format doesn't support wrapping long lines which is one of the more important features in my opinion. Resharper has a free command line tool that supports wrapping long lines. https://www.jetbrains.com/help/resharper/CleanupCode.html https://www.jetbrains.com/help/resharper/CleanupCode.html I made a wrapper for it to try and make it easier to use. https://github.com/sethreno/ReGitLint#regitlint https://github.com/sethreno/ReGitLint#regitlint
- Guillaume86 6y agoThanks I will check it out
- Merad 6y agoReSharper's formatter is pretty good, but you do have to pay to use it in the VS IDE and it's kind of slow. The service I'm working on at present is fairly small (20k LOC) and formatting the entire solution takes about 5 minutes in the IDE or 30 minutes in CI. :/
- sethreno 6y agoIs your service open source? I'd be interested in testing it. Also, you could speed up formatting in CI by only formatting files that changed.
- Merad 6y agoNah, this is from my day job so it's a proprietary closed source thing. Supposedly the CI speed issues are because the CI has to start with cold caches every run (we use Gitlab pipelines that run in docker containers) whereas the IDE has the caches on hand. Something about the way our devops has set up the Gitlab runners makes enabling shared cache much hard than it should be so I haven't had the chance to test that. I don't think I ever tried limiting it to only changed files, that's worth a shot.
- gregors 6y agohttps://github.com/StyleCop https://github.com/StyleCop FWIW I'd just use the autoformat inside visual studio https://stackoverflow.com/questions/5755942/how-do-you-auto-format-code-in-visual-studio https://stackoverflow.com/questions/5755942/how-do-you-auto-...