Skip to content

[WIP] Fix GitHub Linguist misclassifying repo language as HTML instead of C##4

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-3
Closed

[WIP] Fix GitHub Linguist misclassifying repo language as HTML instead of C##4
Copilot wants to merge 1 commit intomainfrom
copilot/fix-3

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 4, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Currently, GitHub shows this repository as being mostly HTML, even though the main codebase is C#. This is caused by GitHub Linguist automatically detecting .razor and .cshtml files as HTML, which inflates the HTML percentage.

Task

Add a .gitattributes file at the root of the repository to correctly configure language detection.

Ensure .razor and .cshtml files are counted as C#.

Mark vendor/static files (like /wwwroot/) as linguist-vendored so they don’t skew the stats.

Verify that GitHub’s language stats update to show C# as the primary language.

Example configuration

Force Razor and CSHTML files to be detected as C#

*.razor linguist-language=C#
*.cshtml linguist-language=C#

Ignore static/vendor files from language stats

wwwroot/* linguist-vendored

Acceptance Criteria

After pushing, GitHub repo language breakdown should reflect C# as the dominant language.

HTML/CSS should only reflect actual front-end code, not Razor/CSHTML server pages.

Fixes #3.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@snxethan
Copy link
Copy Markdown
Owner

snxethan commented Sep 5, 2025

try again

@snxethan snxethan closed this Sep 5, 2025
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

Successfully merging this pull request may close these issues.

Fix GitHub Linguist misclassifying repo language as HTML instead of C#

2 participants