INNER CODE UNIT · Python

RuleConverter

project-codeguard/rules · src/converter.py:72

class RuleConverter:
    """
    Converts markdown rules to multiple IDE formats.

    Uses the BaseFormat abstraction to support multiple IDE formats in an extensible way.
    New formats can be added by creating a new BaseFormat subclass and passing it to the converter.

    Main Methods:
        - parse_rule(): Parse markdown file with YAML frontmatter
        - generate_globs(): Convert languages to glob patterns
        - convert(): Convert a rule file to all registered formats (returns ConversionResult)

    Example:
        # Create converter
        from converter import RuleConverter, ConversionResult, FormatOutput
        from formats import CursorFormat, WindsurfFormat
        from utils import get_version_from_pyproject

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…