tools: Check copyright now checks assembly files

This commit updates the pre-commit configuration and check copyright
script to check assembly files (extensions '.s' and '.S').
pull/8350/head
Darian Leung 2022-02-03 20:50:52 +08:00
rodzic a470ae224d
commit e49f56a96d
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -109,7 +109,7 @@ repos:
- 'pyyaml == 5.4.1'
- 'pathspec == 0.9.0'
language: python
files: \.(py|c|h|cpp|hpp|ld)$
files: \.(py|c|h|cpp|hpp|ld|s|S)$
require_serial: true
- id: check-tools-files-patterns
name: Check tools dir files patterns

Wyświetl plik

@ -188,7 +188,7 @@ def get_file_mime(fn: str) -> str:
return MIME['python']
if fn.endswith(('.cpp', '.hpp')):
return MIME['cpp']
if fn.endswith(('.c', '.h', '.ld')):
if fn.endswith(('.c', '.h', '.ld', '.s', '.S')):
return MIME['c']
raise UnsupportedFileType(fn)