Fix years in two advisories and add linter rule for years
This commit is contained in:
Родитель
1ec8f4140b
Коммит
00eb222bda
|
@ -1,5 +1,5 @@
|
|||
## mfsa2024-03.yml
|
||||
announced: January 22, 2023
|
||||
announced: January 22, 2024
|
||||
impact: critical
|
||||
fixed_in:
|
||||
- Focus for iOS 122
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## mfsa2024-09.yml
|
||||
announced: February 19, 2023
|
||||
announced: February 19, 2024
|
||||
impact: high
|
||||
fixed_in:
|
||||
- Focus for iOS 122
|
||||
|
|
|
@ -115,9 +115,11 @@ def check_file(file_name):
|
|||
|
||||
if 'announced' in data:
|
||||
try:
|
||||
parsedate(data['announced']).date()
|
||||
date = parsedate(data['announced']).date()
|
||||
except Exception:
|
||||
return 'Failed to parse "{}" as a date'.format(data['announced'])
|
||||
if not data['mfsa_id'].startswith(str(date.year)):
|
||||
return 'Year mismatch between mfsa id ({}) and "announced" field ({})'.format(data['mfsa_id'], data['announced'])
|
||||
|
||||
try:
|
||||
schema.validate(data)
|
||||
|
|
Загрузка…
Ссылка в новой задаче