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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically detect if no programming language is present to show overview in data-only repository #1311

Open
quazar-omega opened this issue Apr 20, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@quazar-omega
Copy link
Contributor

quazar-omega commented Apr 20, 2024

Hi!

Summary 馃挕

Even in repositories where there are no programming languages (e.g. https://github.com/LemmyNet/lemmy-ansible) but only data/configuration, by default you get this:

Error: Could not find any source code in this repository

Maybe in such cases it shouldn't ignore non-programming languages and produce an error output, but fall back to the other most prevalent language.

Motivation 馃敠

Related to #1208.
I didn't know right away how to make YAML appear and I was confused because I saw that it was supported as a language, then I found that issue and understood, but it wasn't very intuitive.

Maybe it is also worth reopening that issue, I think an improvement there could be to enrich this error message with suggestions, like:

Error: Looking for programming language source code, but couldn't find any in this repository
       You can add the option `-T data/markup/...` to show the repository overview regardless

Or even better, based on the content of the repository, it could suggest which argument to provide to the -T option, though, if it's able to do that, it would probably be better to just do it without further user intervention, which falls back into this issue (idk, I'm confused because I'm not aware of all the possibilities)

@quazar-omega quazar-omega added the enhancement New feature or request label Apr 20, 2024
@spenserblack
Copy link
Collaborator

Semi-related to #1305. Detectable files can be controlled with a configuration, and also a summary can be generated with different options to get different results.

@quazar-omega
Copy link
Contributor Author

So do you think that the option should just be better represented?
IMO, even just a more verbose error message would suffice as I feel like it's more of a discoverability issue and the current error text sounds a bit misleading at first sight

@spenserblack
Copy link
Collaborator

Yeah, I do think updating the error message is a great start. I was kind of just hinting at how this could be handled in the future and investigating the idea of automatically removing filters if nothing is detected.

@quazar-omega
Copy link
Contributor Author

Oh, I see now!

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

No branches or pull requests

2 participants