Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.NET] Adopt c# 10 file scoped namespaces #271

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

Romfos
Copy link
Contributor

@Romfos Romfos commented Aug 15, 2024

🤔 What's changed?

Adopt c# 10 file scoped namespaces

documentation: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces

⚡️ What's your motivation?

Adopt modern c# language feature to simplify code base

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

no changes in product. code style changes only

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@Romfos
Copy link
Contributor Author

Romfos commented Aug 15, 2024

Parser.cs is not changed because it has this header

// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by Berp (http://https://github.com/gasparnagy/berp/).
// 
//      Changes to this file may cause incorrect behavior and will be lost if
//      the code is regenerated.
//  </auto-generated>
// ------------------------------------------------------------------------------

@Romfos Romfos marked this pull request as ready for review August 15, 2024 17:37
@mpkorstanje
Copy link
Contributor

You can edit dotnet/gherkin-csharp.razor to apply the name spaces to the generated code. Instruction on how to generate the parser can be found in CONTRIBUTING.md.

Copy link

@clrudolphi clrudolphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the 1 spacing/formatting item found (commented elsewhere), this looks good.
It would be nice, for consistency's sake, to complete this PR by adding in the changes required of the razor file that @mpkorstanje suggested. I can walk you through them if you need it.

dotnet/Gherkin/TokenMatcher.cs Outdated Show resolved Hide resolved
@Romfos Romfos requested a review from clrudolphi August 15, 2024 22:10
@Romfos
Copy link
Contributor Author

Romfos commented Aug 15, 2024

please squash this PR during merging

@Romfos
Copy link
Contributor Author

Romfos commented Aug 15, 2024

I propose to make changes in code-generation later if needed, because I'm planning to propose another changes in this library, including code style changes

@mpkorstanje mpkorstanje merged commit bae4442 into cucumber:main Aug 16, 2024
2 checks passed
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.

3 participants