When parsing gitattributes files, **/*.ext is treated differently from *.ext.
*.ext is treated the same as ./*.ext while **/*.ext is the one that matches into subfolders.
GitHub Linguist treats these the same.
Using a .gitattributes of *.ext linguist-language=Lang:`
File structure of .gitattributes, file.ext.
Result: file classified as Lang.
File structure of .gitattributes, folder/file.ext.
Result: under 'Unknown files and extensions'.
Output difference
```
>npx linguist-js@2.4.0 -a
Need to install the following packages:
linguist-js@2.4.0
Ok to proceed? (y) y
Analysed 1,633 B from 1 files with linguist-js
Language analysis results:
1. █ Less 100.00% 1,633 B
Total: 1,633 B
>npx linguist-js@2.4.1 -a
Need to install the following packages:
linguist-js@2.4.1
Ok to proceed? (y) y
Analysed 1,633 B from 1 files with linguist-js
Language analysis results:
None
Total: 0 B
Unknown files and extensions:
'*.ext': 1,633 B
Total: 1,633 B
```
When parsing gitattributes files,
**/*.ext
is treated differently from*.ext
.*.ext
is treated the same as./*.ext
while**/*.ext
is the one that matches into subfolders. GitHub Linguist treats these the same.Using a
.gitattributes
of*.ext linguist-language=Lang
:`.gitattributes
,file.ext
. Result: file classified as Lang..gitattributes
,folder/file.ext
. Result: under 'Unknown files and extensions'.Running with versions 2.4.0 vs 2.4.1 https://github.com/Nixinova/LinguistJS/compare/2.4.0...2.4.1
Relevant changes in v 2.4.1:
Output difference
``` >npx linguist-js@2.4.0 -a Need to install the following packages: linguist-js@2.4.0 Ok to proceed? (y) y Analysed 1,633 B from 1 files with linguist-js Language analysis results: 1. █ Less 100.00% 1,633 B Total: 1,633 B >npx linguist-js@2.4.1 -a Need to install the following packages: linguist-js@2.4.1 Ok to proceed? (y) y Analysed 1,633 B from 1 files with linguist-js Language analysis results: None Total: 0 B Unknown files and extensions: '*.ext': 1,633 B Total: 1,633 B ```