Skip to content

Normalize namespace rules #447

@askpt

Description

@askpt

In some places we use file-scoped namespaces, in others the older style - should be moving towards adopting one or are we fine with a mix?

Originally posted by @kylejuliandev in #397 (comment)

Description

As originally posted by @kylejuliandev, we allow a mixture of namespace styles. We should use file-scoped since it reduces nesting, and we already use the latest language version.

We should add to the .editorconfig:

# IDE0161: Convert to file-scoped namespace
csharp_style_namespace_declarations = file_scoped:warning

Then run dotnet format OpenFeature.sln at the repository's root to clean it up.

Notes

See https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0160-ide0161 for reference.
I will leave this open for a while. Please let us know if anyone has objections about switching to file-scoped by default.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions