Skip to content

Use config-file instead of constant/static variable in formatters for supported languages #33

Description

@asccc

Currently, all formatters use a static variable (or constant) to indicate support for specific languages.
This works, but has some performance penalties, because (in worst cases) all formatters are autoloaded at runtime just to check if a specific language is supported.

My suggestion would be some kind of mapping/config file.
Example:

formatters:
  - formatter: ClangCodeFormatter
    languages: 
      - c
      - cpp
      - csharp
      - java
      - objectivec

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions