INNER CODE UNIT · Python

parse_rule

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

    def parse_rule(self, content: str, filename: str) -> ProcessedRule:
        """
        Parse a markdown file with required frontmatter.

        Args:
            content: Full file content with YAML frontmatter
            filename: Name of the file being parsed

        Returns:
            ProcessedRule with validated frontmatter and content

        Raises:
            ValueError: If frontmatter is missing or invalid
        """
        # Parse frontmatter and content using shared utility
        frontmatter, markdown_content = parse_frontmatter_and_content(content)

        if not frontmatter:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…