Fix CI workflow: Add tree-sitter CLI installation and fix linting errors
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-03 07:13:51 +00:00
parent b65d6e2e48
commit cccb3c0eab

View File

@@ -1,6 +1,5 @@
"""Analyze command for VibeGuard CLI.""" """Analyze command for VibeGuard CLI."""
import os
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
@@ -64,7 +63,7 @@ def analyze(
file_issues = analyze_file(file_path, pattern_manager, config) file_issues = analyze_file(file_path, pattern_manager, config)
issues.extend(file_issues) issues.extend(file_issues)
console.print(f"\n[summary]Analysis Complete[/summary]") console.print("\n[summary]Analysis Complete[/summary]")
console.print(f"Files scanned: {len(files)}") console.print(f"Files scanned: {len(files)}")
console.print(f"Issues found: {len(issues)}\n") console.print(f"Issues found: {len(issues)}\n")
@@ -80,8 +79,6 @@ def analyze(
console.print() console.print()
if output_json: if output_json:
import json
console.print_json(data={"issues": issues, "summary": severity_counts}) console.print_json(data={"issues": issues, "summary": severity_counts})
elif output_html: elif output_html:
generator = ReportGenerator() generator = ReportGenerator()
@@ -100,8 +97,6 @@ def analyze_file(
path: Path, pattern_manager: PatternManager, config: Config path: Path, pattern_manager: PatternManager, config: Config
) -> list[dict[str, Any]]: ) -> list[dict[str, Any]]:
"""Analyze a single file for anti-patterns.""" """Analyze a single file for anti-patterns."""
from vibeguard.analyzers.base import BaseAnalyzer
issues: list[dict[str, Any]] = [] issues: list[dict[str, Any]] = []
analyzer = AnalyzerFactory.get_analyzer(path) analyzer = AnalyzerFactory.get_analyzer(path)