CodeConverter
CodeConverter copied to clipboard
Using .editorconfig
Is your feature request related to a problem? Please describe. After completion, the code needs to be adapted to the code style and rules as defined by the .editorconfig file used by the project.
Describe the solution you'd like Implement the specifications delineated in the project's .editorconfig file.
Describe alternatives you've considered Add the .editorconfig file used by the convertion program to the project overriding (but not copying over) the solution .editorconfig file.
Additional context An editor config file that is common to all solution might be located at the root folder common to these solutions. This might be overidden by projects having their own code style, such as those cloned from shared repositories. Thus, having a local .editorconfig file generated by the converter would suffice for those who are content with having different code styles in different projects.
Thanks. It does slightly pain me never to have got around to this. In the meantime, the workaround is just to run an existing formatting tool after the converter: https://github.com/icsharpcode/CodeConverter/issues/448 I do think this would be worthwhile at some point, it's just hard to prioritise above bugfixes when there's a straightforward workaround, but very happy to discuss solutions and accept a PR (should be minimal in code, delegating to roslyn directly, or another library)
priorities make sense. Using a formatting tool also is doable.
Two points, though:
- Using the tool on a perfect conversion might work well. Still, having Visual Studio do the refactoring has worked very well for my needs after fixing any broken code.
- Refactoring could be put off by having the converter save it’s own .editorconfig file for the project.
Point 2 could serve as a great first off workaround even for those with a formatting tool in their toolbox.
From: GrahamTheCodermailto:[email protected] Sent: Thursday, October 8, 2020 5:51 PM To: icsharpcode/CodeConvertermailto:[email protected] Cc: David Harymailto:[email protected]; Authormailto:[email protected] Subject: Re: [icsharpcode/CodeConverter] Using .editorconfig (#649)
In the meantime, the workaround is just to run an existing formatting tool after the converter: #448https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ficsharpcode%2FCodeConverter%2Fissues%2F448&data=02%7C01%7C%7C78263f642144457c9ced08d86bed83b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637378015139662259&sdata=ptP5HOgzVggEE0XnRszj8spzputESGui3feZcwbW0eg%3D&reserved=0 I do think this would be worthwhile at some point, it's just hard to prioritise above bugfixes when there's a straightforward workaround, but very happy to discuss solutions and accept a PR (should be minimal in code, delegating to roslyn directly, or another library)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ficsharpcode%2FCodeConverter%2Fissues%2F649%23issuecomment-705903101&data=02%7C01%7C%7C78263f642144457c9ced08d86bed83b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637378015139672253&sdata=szDwDCxiqPyrQLQX%2F05eNvrLJuJUdGxMAUqoM%2Bylet8%3D&reserved=0, or unsubscribehttps://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAGBGSQWT7ZXXSAVU62BKPTSJZNCRANCNFSM4SHSZ5UQ&data=02%7C01%7C%7C78263f642144457c9ced08d86bed83b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637378015139672253&sdata=EzU8JTOmEOkWznBD%2FVEURXubcrTflrQPhY17kGOJJG0%3D&reserved=0.