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

.cls file extension not recognized #1095

Open
MaxBGreenberg opened this issue Jun 25, 2023 · 6 comments
Open

.cls file extension not recognized #1095

MaxBGreenberg opened this issue Jun 25, 2023 · 6 comments
Labels
enhancement New feature or request upstream

Comments

@MaxBGreenberg
Copy link

Summary 💡

When I try to run onefetch on a repository for a LaTeX document class, file extension .cls, it returns an error, Error: Could not find any source code in this repository. It appears that this file extension is not recognized.

Motivation 🔦

Working on some custom XeLaTeX document classes which I'm tracking with git.

@MaxBGreenberg MaxBGreenberg added the enhancement New feature or request label Jun 25, 2023
@spenserblack
Copy link
Collaborator

Note: https://github.com/XAMPPRocky/tokei/blob/958e1d03ef57936b9565465b05babc222cb54e34/languages.json#L1570

@spenserblack
Copy link
Collaborator

I don't know if it will be possible for us to handle this out-of-the-box. Last I checked, tokei (our language analysis tool) is designed in a way that languages cannot share the same file extensions. See XAMPPRocky/tokei#520 for example.

This will need to be resolved upstream with tokei (and tokei will need a new release to crates.io 😅).

You might be able to argue your case by showing some data. For example, with a quick search, 25k TeX files use the .cls extension, and less than 7k VBA files use .cls as the extension. IMO if an extension can only belong to one language, it should at least be the most common language 😆

@MaxBGreenberg
Copy link
Author

Having looked through their issues, it looks like they're working towards adding a feature where you can remap a file extension to the .tokeirc configuration file. Does .tokeirc affect the behaviour of onefetch?

@spenserblack
Copy link
Collaborator

Since .tokeignore is used without us needing to explicitly enable/use it, I assume that .tokeirc would similarly be read without us needing to do anything besides bump the tokei version.

@spenserblack
Copy link
Collaborator

Just stumbled on XAMPPRocky/tokei#1014. Linking.

@spenserblack
Copy link
Collaborator

FYI #1152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream
Projects
None yet
Development

No branches or pull requests

2 participants