Check documentation builds successfully.
(self)
| 229 | return False, "", str(e) |
| 230 | |
| 231 | def _check_documentation(self) -> Tuple[bool, str, Optional[str]]: |
| 232 | """Check documentation builds successfully.""" |
| 233 | try: |
| 234 | # Try to build documentation |
| 235 | cargo_path = shutil.which("cargo") |
| 236 | if not cargo_path: |
| 237 | raise FileNotFoundError("cargo executable not found in PATH") |
| 238 | result = subprocess.run([cargo_path, "doc", "--no-deps", "--workspace"], capture_output=True, text=True, cwd=self.root_path, timeout=300, shell=False) # nosec |
| 239 | |
| 240 | return result.returncode == 0, result.stdout, result.stderr if result.returncode != 0 else None |
| 241 | |
| 242 | except subprocess.TimeoutExpired: |
| 243 | return False, "", "Documentation build timed out" |
| 244 | except Exception as e: |
| 245 | return False, "", str(e) |
| 246 | |
| 247 | def _generate_report(self): |
| 248 | """Generate validation report.""" |