Support file scoped namespace declarations when generating code#140
Support file scoped namespace declarations when generating code#140gasparnagy merged 13 commits intomainfrom
Conversation
* Initial plan * Fix indentation in generated step definition classes Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> * Complete indentation fix - all checks passed Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> * Remove accidentally committed nuget.exe binary Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Remove nuget.exe from .gitignore
…amespaces # Conflicts: # CHANGELOG.md
|
This is ready for review. I tested it locally and added snapshot tests :) |
gasparnagy
left a comment
There was a problem hiding this comment.
I've scanned it through and it looks cool! I'll make a more detailed review during my holidays.
|
@gasparnagy polite bump. FYI I have tested this locally |
Yes, sorry for the delay. It's on my list... Pretty busy for the rest of the week, so can check probably next week only. |
gasparnagy
left a comment
There was a problem hiding this comment.
Sorry for the late review. This is nice, thx!
It has turned out, that the EditorConfigOptionsProvider implemetation was slightly incorrect, because when it used the CreateAdHocDocument path it has just picked the first project to make the ad-hoc document for. But in reality, if you query the editorconfig values through the "wrong" project, the configured values don't come through. So in the https://github.com/reqnroll/Reqnroll.ExploratoryTestProjects/tree/main/ReqnrollCalculator if I added the editorconfig to the Specs project then it could not query it thought the ReqnrollCalculator project, that was the first.
I think this problem was not discovered, because we usually queried it for a IWpfTextView which usually had a document anyway, so it rarely went to the CreateAdHocDocument path.
Anyway. I have added a heuristic to try choosing the right project based on the folder. With that it works.
|
Thanks! |
|
Released today in: https://github.com/reqnroll/Reqnroll.VisualStudio/releases/tag/v2026.1.477 |
🤔 What's changed?
Generated file scoped namespaces when set in .editorconfig
Normally "create" generates this:
With
We get this:
In VS config:

⚡️ What's your motivation?
Keep the code style from the editorconfig.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.