MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / format_comment

Function format_comment

etc/scripts/check_infra_settings.py:86–110  ·  view source on GitHub ↗
(missing_types: set[str], missing_stdvers: set[str])

Source from the content-addressed store, hash-verified

84
85
86def format_comment(missing_types: set[str], missing_stdvers: set[str]) -> str:
87 lines = [
88 MARKER,
89 "### Infra `settings.yml` may need updating",
90 "",
91 "This PR adds values that are not currently listed in "
92 "[`compiler-explorer/infra/init/settings.yml`]"
93 "(https://github.com/compiler-explorer/infra/blob/main/init/settings.yml):",
94 "",
95 ]
96 if missing_types:
97 lines.append("**New `compilerType` values:**")
98 lines.extend(f"- [ ] `{t}`" for t in sorted(missing_types))
99 lines.append("")
100 if missing_stdvers:
101 lines.append("**New `stdver` values:**")
102 lines.extend(f"- [ ] `{s}`" for s in sorted(missing_stdvers))
103 lines.append("")
104 lines.append(
105 "Please open a matching PR in "
106 "[compiler-explorer/infra](https://github.com/compiler-explorer/infra) "
107 "to add these to `init/settings.yml` — Conan library builds will fail "
108 "otherwise."
109 )
110 return "\n".join(lines) + "\n"
111
112
113def main() -> int:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected