mirror of
https://github.com/tc39/test262.git
synced 2025-11-12 17:59:44 +01:00
fixes linter for directories with json files
Fixes error when linting the `json-modules` feature which points to test/language/import/import-attributes, containing .json fixture files. The linter's file_is_test() function was only filtering out FIXTURE.js files but not .json files, so it tried to read frontmatter from the JSON files and failed.
This commit is contained in:
parent
d151c921fc
commit
edfec3e641
@ -22,7 +22,7 @@ def read_features(filename):
|
||||
return yaml.safe_load(frontmatter).get('features', [])
|
||||
|
||||
def file_is_test(filename):
|
||||
return not filename.endswith('FIXTURE.js')
|
||||
return not (filename.endswith('FIXTURE.js') or filename.endswith('.json'))
|
||||
|
||||
def pattern_from_path_spec(path_spec):
|
||||
return re.compile(re.sub('\*', '.*', path_spec))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user