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

Add .vs GLSL vertex shader extension #6536

Merged
merged 4 commits into from
Sep 7, 2023

Conversation

FrostKiwi
Copy link
Contributor

@FrostKiwi FrostKiwi commented Sep 6, 2023

Added missing .vs extension to recognize .vs files as GLSL.
For GLSL fragment shaders it is common to have either .fs or .frag as your file extension. Both are present in this line of languages.yml. For the vertex shader however, only .vert is present and the counterpart to .fs, .vs has been forgotten. This has been fixed with this PR

Description

This solves GitHub support ticket #2320418, which had the following issue:

Issue caused by .vs not being in linguist

The main GitHub website does Syntax Highlighting based on the language it detects. It also shows a repo's language breakdown:
image

This feature has a bug when detecting GLSL Shaders. You can observe this bug in my repo: https://github.com/FrostKiwi/Mirrorball
Take a look at the detected GLSL shaders: https://github.com/search?q=repo%3AFrostKiwi%2FMirrorball++language%3AGLSL&type=code and what is actually in that directory: https://github.com/FrostKiwi/Mirrorball/tree/main/src/shd

You see two file types.

.fs for fragment shaders and .vs for vertex shaders are a common choise along side .frag and .vert. So this is not a repo-specific naming, but a common one.

Checklist:

@FrostKiwi FrostKiwi requested a review from a team as a code owner September 6, 2023 01:33
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the samples you've referenced in the template to the PR in the GLSL samples directory and update the template to state the licence of each file. ProTip: if the file is not shown fully in the diff, it's too big so should be replaced with a smaller file. Two samples should be plenty so pick two that differ the most (these are used to train the classifier).

Please also update the search query in the template.

@FrostKiwi
Copy link
Contributor Author

Please add the samples you've referenced in the template to the PR in the GLSL samples directory and update the template to state the licence of each file. ProTip: if the file is not shown fully in the diff, it's too big so should be replaced with a smaller file. Two samples should be plenty so pick two that differ the most (these are used to train the classifier).

Please also update the search query in the template.

Updated to reflected the requested changes.

lib/linguist/languages.yml Outdated Show resolved Hide resolved
@lildude lildude changed the title Add missing GLSL vertex shader extension Add .vs GLSL vertex shader extension Sep 7, 2023
@lildude lildude added this pull request to the merge queue Sep 7, 2023
Merged via the queue into github-linguist:master with commit 9b634a0 Sep 7, 2023
5 checks passed
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants