INNER CODE UNIT · Python
end_idx
project-codeguard/rules · src/convert_to_ide_formats.py:98
end_idx = content.index(end_marker) + len(end_marker)
new_section = f"\n\n{table}\n\n"
updated_content = content[:start_idx] + new_section + content[end_idx:]
# Write back to SKILL.md
skill_file.write_text(updated_content, encoding="utf-8")
print(f"Updated SKILL.md with language mappings")
def convert_rules(
input_path: str,
output_dir: str = "dist",
include_agentskills: bool = True,
version: str = None,
filter_tags: list[str] = None,
) -> dict[str, list[str]]:
"""
Convert rule file(s) to all supported IDE formats using RuleConverter.