INNER CODE UNIT · Python

convert

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

    def convert(self, filepath: str) -> ConversionResult:
        """
        Convert a rule file to all registered formats.

        This method handles the entire conversion pipeline:
        - Reading the file
        - Parsing and validating
        - Generating all format outputs

        Args:
            filepath: Path to the rule file to convert (str or Path)

        Returns:
            ConversionResult with filename, basename, and format outputs

        Raises:
            FileNotFoundError: If the rule file doesn't exist
            ValueError: If the rule has invalid frontmatter or structure

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…