提交 c1fbfe88 编写于 作者: M Mars Liu

check keywords of section nodes only

上级 144cb1e0
......@@ -69,7 +69,7 @@ def ensure_exercise(path):
ensure_node(node_path, mfile)
def check_node(path):
def check_section_node(path):
dir, _ = os.path.split(path)
data = load_json(path)
if not data.get("keywords", []):
......@@ -83,5 +83,5 @@ def pre_commit():
_, filename = os.path.split(path)
if ext == ".md" and path.startswith("data/"):
ensure_exercise(path)
elif filename == "config.json" and path.startswith("data/"):
check_node(path)
elif filename == "config.json" and path.startswith("data/") and path.count("/") == 4:
check_section_node(path)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册