Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

Generated step definition classes had closing braces incorrectly concatenated on the same line, producing malformed code like } } for block-scoped namespaces and }} for file-scoped namespaces.

Root cause: The code generator used StringBuilder.Append() instead of AppendLine() when appending the step definition snippet, causing the class closing brace to appear on the same line as the method's closing brace.

Changes:

  • DefineStepsCommand.cs: Changed template.Append(adjustedSnippet) to template.AppendLine(adjustedSnippet) in GenerateStepDefinitionClass()
  • Updated approval test expectations to reflect corrected formatting

Before:

        throw new PendingStepException();
    }    }  // Block-scoped: extra spaces between braces
}

    }}  // File-scoped: concatenated braces

After:

        throw new PendingStepException();
    }
    }  // Block-scoped: proper line break and indentation
}

    }
}  // File-scoped: proper line break

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 16, 2025 20:06
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 16, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add support for file scoped namespace declarations Fix indentation in generated step definition classes Dec 16, 2025
Copilot AI requested a review from 304NotModified December 16, 2025 20:11
@304NotModified 304NotModified marked this pull request as ready for review December 16, 2025 20:12
@304NotModified 304NotModified merged commit 7107c99 into support-file-scoped-namespaces Dec 16, 2025
@gasparnagy gasparnagy deleted the copilot/sub-pr-140-again branch December 17, 2025 16:41
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 this pull request may close these issues.

2 participants