Skip to content

Code Quality: Enforce usage of FileExtensionHelpers to check file extensions across codebase #18049

@Lamparter

Description

@Lamparter

Description

There is a helper, FileExtensionHelpers, which is a unified static class for determining file type by extension. However, some parts of the codebase manually check file types without using that helper, e.g.:

public static bool ContainsExtension(string extension)
=> extension is ".htm" or ".html" or ".svg";

Concerned code

~ Code search results ("ContainsExtension")

Gains

  • Use of unified helper

Requirements

  • Create new helper methods
  • Replacing methods with existing ones

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    🔖 Ready to build

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions