-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Request: Add XML Heuristic for *proj$ File Pattern #7090
Comments
This is not necessary. All standard XML files are already correctly detected as such, unless there is a specific language entry for them thanks to the XML strategy: linguist/lib/linguist/strategy/xml.rb Line 26 in f164d13
The strategies are applied in this order: Lines 62 to 71 in f164d13
You can tell this is already working as expected as all of the files in the seach results are already identified as XML (hence you can use the This raises the question: why do you think we need this when it's already the case? Where are you seeing this not taking effect? |
Good point. The issue is that these |
Oh wait, I think I understand what you're getting at. No. We'd prefer to add support for extensions on a one-by-one basis as we require usage levels to be met before support can be added. |
Do you know how is fsproj or csproj getting recognized? e.g. https://github.com/blowdart/AspNetAuthenticationWorkshop/blob/fbe24ffd430bf38855e10e7e9344083e038cc269/src/Step6/Step_6_Adding_Mvc.csproj doesn't have the preamble and with <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project> |
Reason why I'm asking is file starting with |
Yup, they're explicitly listed under XML... linguist/lib/linguist/languages.yml Line 8029 in f164d13
linguist/lib/linguist/languages.yml Line 8038 in f164d13
|
Yes, it didn't recognized slnx that way though. |
Explaination: #7084 (comment) |
Thanks. Lets close this one. |
query: https://github.com/search?q=path:*.*proj+language:xml&type=code
Microsoft has used XML as the format for project files for decades, with many project files having the
proj
suffix (e.g.,.csproj
,.vbproj
,.fsproj
,.pyproj
,.jsproj
,.sfproj
and couple of dozen others). These files follow a consistent XML structure, but listing every project file extension individually can be cumbersome.Suggestion:
To streamline the classification and ensure proper syntax highlighting for these files, it would make sense to add a heuristic rule to detect and classify files ending with
proj
as XML. Specifically, applying an XML heuristic to files that match the regex pattern^*.*proj$
would allow these files to be recognized and highlighted as XML automatically, without the need to list each extension separately.This improvement would cover a wide variety of project file extensions and enhance the developer experience on GitHub.
The text was updated successfully, but these errors were encountered: