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

Adding support for more file types #698

Closed
emilk opened this issue Mar 23, 2023 · 3 comments
Closed

Adding support for more file types #698

emilk opened this issue Mar 23, 2023 · 3 comments

Comments

@emilk
Copy link

emilk commented Mar 23, 2023

Hi, and thanks for a great tool!

There are some files that typos misses, because it doesn't know about their extension. In my project we have a bunch of shaders, written in wgsl. How would I go about convincing typos to also check wgsl files? I'd be happy to make a PR!

I checked CONTRIBUTING.md but found nothing about how to add support for more file types.

@epage
Copy link
Collaborator

epage commented Mar 23, 2023

What is it you are seeing where typos isn't supporting a file?

File types are used for per-file-type configuration and we don't need to know about a file type to check it, relying solely on the default configuration.

@emilk
Copy link
Author

emilk commented Mar 25, 2023

I had a typo in wgsl that wasn't caught by typos, so I checked typos --help which says:

--type-list Show all supported file types

and since wgsl is not found in typos --type-list, I conclude that wgsl is not a supported file type 🤷

@epage
Copy link
Collaborator

epage commented Mar 25, 2023

That wording was taken from rg

$ rg -h | rg type
    rg [OPTIONS] --type-list
    -t, --type <TYPE>...                         Only search files matching TYPE.
        --type-add <TYPE_SPEC>...                Add a new glob for a file type.
        --type-clear <TYPE>...                   Clear globs for a file type.
        --type-list                              Show all supported file types.
    -T, --type-not <TYPE>...                     Do not search files matching TYPE.

While it is referring to supported in the other arguments, we are referring to being supported in the configuration for special casing

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
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

No branches or pull requests

2 participants