Skip to content

Commit

Permalink
another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Oct 19, 2023
1 parent 90bd998 commit d416b83
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/check_makefiles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import sys
from pathlib import Path

Expand Down Expand Up @@ -28,12 +29,9 @@ def check_makefile(makefile):
for key in correct_params:
if key in line:
try:
_, v = line.split(":=")
k, v = re.split(":=|\?=|=", line)
except ValueError:
try:
_, v = line.split("=")
except ValueError:
sys.exit(f"invalid line: {line}")
sys.exit(f"invalid line: {line}")

if not v.strip() == correct_params[key]:
sys.exit(f"invalid param {key} in {makefile}")
Expand Down

0 comments on commit d416b83

Please sign in to comment.