LGTM (a small fixup is needed to get --stdin working again with this but that can land after):
diff --git a/scripts/check-syntax b/scripts/check-syntax
index ba2645516a4..1dd37810acd 100755
--- a/scripts/check-syntax
+++ b/scripts/check-syntax
@@ -538,14 +538,18 @@ def check_cve(cve):
cve_okay = True
srcmap = dict()
try:
- # Try to locate the base CVE and load that, but not if this is a
- # boilerplate path
- if is_boilerplate(cve):
+ if opt.stdin:
+ # fixup cve below once we have loaded it cvepath = cve
- cve = os.path.basename(cve)
else:
- cve = os.path.basename(cve)
- cvepath = cve_lib.find_cve(cve)
+ # Try to locate the base CVE and load that, but not if this is a
+ # boilerplate path
+ if is_boilerplate(cve):
+ cvepath = cve
+ cve = os.path.basename(cve)
+ else:
+ cve = os.path.basename(cve)
+ cvepath = cve_lib.find_cve(cve)
data = cve_lib.load_cve(cvepath, opt.strict, srcmap=srcmap)
except ValueError as e:
print(e, file=sys.stderr)
LGTM (a small fixup is needed to get --stdin working again with this but that can land after):
diff --git a/scripts/ check-syntax b/scripts/ check-syntax .1dd37810acd 100755 check-syntax check-syntax cve):
cvepath = cve basename( cve) basename( cve) find_cve( cve) cve): basename( cve) basename( cve) find_cve( cve) load_cve( cvepath, opt.strict, srcmap=srcmap)
index ba2645516a4.
--- a/scripts/
+++ b/scripts/
@@ -538,14 +538,18 @@ def check_cve(cve):
cve_okay = True
srcmap = dict()
try:
- # Try to locate the base CVE and load that, but not if this is a
- # boilerplate path
- if is_boilerplate(
+ if opt.stdin:
+ # fixup cve below once we have loaded it
- cve = os.path.
else:
- cve = os.path.
- cvepath = cve_lib.
+ # Try to locate the base CVE and load that, but not if this is a
+ # boilerplate path
+ if is_boilerplate(
+ cvepath = cve
+ cve = os.path.
+ else:
+ cve = os.path.
+ cvepath = cve_lib.
data = cve_lib.
except ValueError as e:
print(e, file=sys.stderr)