Skip to content

Statistics by directory override language #6299

Answered by lildude
Soltus asked this question in Classification
Discussion options

You must be logged in to vote

I have a demand case,The .ipynb file in the /notebook/csharp directory should counted as C# ,then .ipynb file in the /notebook/fsharp directory should counted as F#

Linguist analyses files in isolation and doesn't consider the directory structor or other files within a directory at all. So if you want all the .ipynb files in /notebook/csharp to be considered as C# and those in /notebook/fsharp to be F#, you will need to implement an override like this:

notebook/csharp/**/*.ipynb linguist-language=csharp
notebook/fsharp/**/*.ipynb linguist-language=fsharp

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lildude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6298 on February 27, 2023 14:02.