Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Xunit.PlatformID should be plural #999

@justinvp

Description

@justinvp

This is very nit-picky, but it's a pet peeve of mine: It'd be nice if the .NET Core code followed the framework design guidelines, even in test infrastructure code, so it feels familiar to .NET developers.

Xunit.PlatformID is a flags enum, and according the design guidelines, it should be plural:

✓ DO use a singular type name for an enumeration unless its values are bit fields.
✓ DO use a plural type name for an enumeration with bit fields as values, also called flags enum.

Thus, I'd like to rename PlatformID to PlatformIDs (plural) to follow the .NET conventions we're used to.

Renaming has an additional benefit: the plural name would no longer conflict with System.PlatformID, which is being added back in the dev/api branch in CoreFX. Renaming the test enum means we'll no longer need to fully qualify it with the namespace anymore, e.g. instead of [PlatformSpecific(Xunit.PlatformID.AnyUnix)] it could simply be [PlatformSpecific(PlatformIDs.AnyUnix)].

I know this will cause some churn, and for a seemingly minor benefit, but I'd be happy to do the work to make it happen, opening a PR in this repo to do the rename, along with PRs in the repos that need to be updated as a result.

cc: @weshaggard @stephentoub @Priya91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions