detect go.mod files as Go language
This commit is contained in:
parent
d11c64db2b
commit
4c4760a805
3 changed files with 10 additions and 0 deletions
|
@ -169,6 +169,10 @@ def get_language_from_extension(file_name):
|
|||
"""
|
||||
|
||||
filepart, extension = os.path.splitext(file_name)
|
||||
pathpart, filename = os.path.split(file_name)
|
||||
|
||||
if filename == 'go.mod':
|
||||
return 'Go'
|
||||
|
||||
if re.match(r'\.h.*$', extension, re.IGNORECASE) or re.match(r'\.c.*$', extension, re.IGNORECASE):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue