Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scripts/docs_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
]
LINK_RE = re.compile(r"\[[^\]]+\]\(([^)]+)\)")
DOCS_ISSUE_TEMPLATE = ".github/ISSUE_TEMPLATE/docs.yml"
PR_TEMPLATE = ".github/pull_request_template.md"
ISSUE_TEMPLATES = {
".github/ISSUE_TEMPLATE/bounty.yml",
".github/ISSUE_TEMPLATE/bug.yml",
".github/ISSUE_TEMPLATE/security-report.yml",
".github/ISSUE_TEMPLATE/docs.yml",
DOCS_ISSUE_TEMPLATE,
}
Comment on lines +28 to +34
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

ISSUE_TEMPLATES is defined but never used.

The constant is declared but not referenced anywhere in the script. Either use it for validation (similar to the PR template check) or remove it to avoid dead code.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/docs_smoke.py` around lines 28 - 34, The ISSUE_TEMPLATES constant
(and DOCS_ISSUE_TEMPLATE) is dead code; either remove the ISSUE_TEMPLATES
declaration or wire it into the existing template validation flow: add a
validation step that mirrors the PR template check (iterate ISSUE_TEMPLATES,
confirm each path exists or is present in the repo, and raise/print an error if
missing), or simply delete the ISSUE_TEMPLATES set and any unused
DOCS_ISSUE_TEMPLATE reference to avoid unused symbol warnings; update or run
tests accordingly to ensure no references remain.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Remove duplicate entry in ISSUE_TEMPLATES set.

Lines 32 and 33 both add the same path (.github/ISSUE_TEMPLATE/docs.yml) to the set. While sets eliminate duplicates at runtime, this redundancy is confusing. Remove one of these entries.

♻️ Suggested fix
 ISSUE_TEMPLATES = {
     ".github/ISSUE_TEMPLATE/bounty.yml",
     ".github/ISSUE_TEMPLATE/bug.yml",
     ".github/ISSUE_TEMPLATE/security-report.yml",
     ".github/ISSUE_TEMPLATE/docs.yml",
-    DOCS_ISSUE_TEMPLATE,
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ISSUE_TEMPLATES = {
".github/ISSUE_TEMPLATE/bounty.yml",
".github/ISSUE_TEMPLATE/bug.yml",
".github/ISSUE_TEMPLATE/security-report.yml",
".github/ISSUE_TEMPLATE/docs.yml",
DOCS_ISSUE_TEMPLATE,
}
ISSUE_TEMPLATES = {
".github/ISSUE_TEMPLATE/bounty.yml",
".github/ISSUE_TEMPLATE/bug.yml",
".github/ISSUE_TEMPLATE/security-report.yml",
".github/ISSUE_TEMPLATE/docs.yml",
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/docs_smoke.py` around lines 28 - 34, The ISSUE_TEMPLATES set contains
a duplicate entry for ".github/ISSUE_TEMPLATE/docs.yml"; remove the redundant
entry so the set only contains one reference (keep the DOCS_ISSUE_TEMPLATE
symbol if it represents that path or remove the literal string if
DOCS_ISSUE_TEMPLATE is the authoritative constant). Update the ISSUE_TEMPLATES
definition to eliminate the duplicate, referencing the existing unique symbol
ISSUE_TEMPLATES and DOCS_ISSUE_TEMPLATE to locate the code.



def _local_target_exists(source: Path, target: str) -> bool:
Expand Down Expand Up @@ -63,6 +71,10 @@ def main() -> int:
if "link the page, docs file, heading, command, or ui path" not in template:
print("docs issue template location prompt must request actionable evidence")
ok = False
pr_template = ROOT / PR_TEMPLATE
if not pr_template.exists():
print(f"missing PR template: {PR_TEMPLATE}")
ok = False
if ok:
print("docs smoke ok")
return 0
Expand Down
Loading