{"id":50136311,"url":"https://github.com/bivex/miniature-palm-tree","last_synced_at":"2026-05-23T22:03:33.321Z","repository":{"id":328700139,"uuid":"1116352198","full_name":"bivex/miniature-palm-tree","owner":"bivex","description":"90% of Swift Apps Have These Architecture Problems","archived":false,"fork":false,"pushed_at":"2025-12-14T22:38:06.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-17T07:59:48.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bivex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T17:34:07.000Z","updated_at":"2025-12-14T22:38:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bivex/miniature-palm-tree","commit_stats":null,"previous_names":["bivex/miniature-palm-tree"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bivex/miniature-palm-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bivex%2Fminiature-palm-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bivex%2Fminiature-palm-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bivex%2Fminiature-palm-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bivex%2Fminiature-palm-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bivex","download_url":"https://codeload.github.com/bivex/miniature-palm-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bivex%2Fminiature-palm-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33413624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T18:09:33.147Z","status":"ssl_error","status_checked_at":"2026-05-23T18:09:31.380Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-23T22:03:31.831Z","updated_at":"2026-05-23T22:03:33.314Z","avatar_url":"https://github.com/bivex.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AST Analyzer - Swift Code Quality \u0026 Architecture Analysis Tool\n\n[![Swift](https://img.shields.io/badge/Swift-6.0+-orange.svg)](https://swift.org)\n[![Platform](https://img.shields.io/badge/platform-macOS%2014+-blue.svg)](https://www.apple.com/macos)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Build](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com/your-repo/ast-analyzer/actions)\n\n**Advanced Swift AST Analyzer** - A powerful command-line tool for detecting architectural defects, code smells, and maintainability issues in Swift codebases. Built with Clean Architecture principles and Domain-Driven Design (DDD) patterns.\n\n**Keywords:** Swift code analysis, architectural defects detection, Clean Architecture, DDD, static code analysis, code quality metrics, refactoring tools, anti-patterns, maintainability scoring, Swift development tools, code review automation\n\n## 📋 Overview\n\n**AST Analyzer** is a comprehensive static analysis tool specifically designed for Swift developers who want to maintain high code quality and architectural integrity in their projects. This powerful command-line utility performs deep analysis of Swift source code to identify architectural defects, code smells, and maintainability issues that could impact long-term project sustainability.\n\n### 🔍 What It Analyzes\n\n- **Architectural Anti-patterns**: Detects violations of SOLID principles, Clean Architecture patterns, and Domain-Driven Design best practices\n- **Code Quality Metrics**: Measures maintainability scores, complexity metrics, and code health indicators\n- **Performance Indicators**: Identifies potential performance bottlenecks and optimization opportunities\n- **Best Practice Compliance**: Ensures adherence to Swift coding standards and architectural guidelines\n\n### 🏗️ Built with Best Practices\n\nThe analyzer itself follows industry-leading software architecture principles:\n- **Clean Architecture** layered approach for maximum testability and maintainability\n- **Domain-Driven Design (DDD)** with rich domain models and business logic encapsulation\n- **SOLID Principles** ensuring single responsibility and dependency inversion\n- **Test-Driven Development (TDD)** approach with comprehensive test coverage\n\n## 🏛️ Architecture \u0026 Design Patterns\n\nThis project serves as a **reference implementation** of modern Swift application architecture, demonstrating best practices in software design and clean code principles.\n\n### 📚 Clean Architecture Layers\n\nThe codebase is meticulously organized into four distinct layers, each with clear responsibilities and dependencies:\n\n#### 🎯 Domain Layer (`Sources/ASTAnalyzer/Domain/`)\n**Core Business Logic \u0026 Rules**\n- **Entities \u0026 Value Objects**: Immutable domain models representing business concepts\n- **Domain Services**: Business logic that doesn't naturally fit entities\n- **Business Rules**: Invariants and validation logic\n- **Analysis Models**: Defect types, severity levels, and architectural patterns\n\n#### 🔄 Application Layer (`Sources/ASTAnalyzer/Application/`)\n**Use Cases \u0026 Application Services**\n- **Use Cases**: Application-specific business logic orchestration\n- **Command/Query Handlers**: CQRS pattern implementation\n- **Application Services**: Cross-cutting concerns coordination\n\n#### 🔌 Infrastructure Layer (`Sources/ASTAnalyzer/Infrastructure/`)\n**External Concerns \u0026 Adapters**\n- **Repository Adapters**: Data persistence abstractions\n- **External Service Adapters**: Third-party integrations\n- **Configuration Management**: Environment-specific settings\n- **Dependency Injection**: IoC container implementation\n\n#### 💻 Presentation Layer (`Sources/ASTAnalyzer/Presentation/`)\n**User Interface \u0026 Output Formatting**\n- **Console Interface**: Command-line user experience\n- **Output Formatters**: Multiple export formats (Console, JSON, HTML)\n- **Progress Indicators**: Real-time analysis feedback\n\n### 🎨 Design Principles Implemented\n\n#### SOLID Principles\n- **Single Responsibility**: Each class has one reason to change\n- **Open/Closed**: Open for extension, closed for modification\n- **Liskov Substitution**: Subtypes are substitutable for base types\n- **Interface Segregation**: Clients depend only on methods they use\n- **Dependency Inversion**: Depend on abstractions, not concretions\n\n#### Architectural Patterns\n- **Ports \u0026 Adapters (Hexagonal Architecture)**: Technology-agnostic core\n- **Dependency Injection**: Loose coupling through IoC container\n- **Command Query Responsibility Segregation (CQRS)**: Separate read/write models\n- **Domain-Driven Design (DDD)**: Ubiquitous language and bounded contexts\n\n## 🚀 Key Features \u0026 Capabilities\n\n### 🔍 Advanced Architectural Defect Detection\n\n**AST Analyzer** employs sophisticated static analysis techniques to identify critical architectural issues that impact code maintainability, scalability, and development velocity. The tool uses formal methods and mathematical modeling to detect anti-patterns with high precision.\n\n#### 🏗️ Architectural Anti-patterns Detected\n\n| Anti-pattern | Description | Impact Level |\n|-------------|-------------|-------------|\n| **Multifaceted Abstraction** | Classes with multiple responsibilities violating SRP | 🔴 Critical |\n| **God Class** | Overly complex classes with too many methods/properties | 🔴 Critical |\n| **Insufficient Modularization** | Monolithic files that should be split | 🟡 High |\n| **Unnecessary Abstraction** | Empty protocols or interfaces | 🟡 Medium |\n| **Missing Abstraction** | Code duplication requiring extraction | 🟡 High |\n| **Broken Hierarchy** | Inheritance violations (Liskov Substitution) | 🔴 Critical |\n| **Dense Structure** | Methods/functions exceeding complexity limits | 🟡 Medium |\n| **Deficient Encapsulation** | Exposed internal state | 🟡 Medium |\n| **Weakened Modularity** | Tight coupling between modules | 🟡 High |\n| **Long Method** | Methods exceeding recommended line limits | 🟡 Medium |\n| **Lazy Class** | Classes with insufficient functionality | 🟢 Low |\n| **Data Class** | Classes containing only data, no behavior | 🟢 Low |\n| **Massive View Controller** | View Controllers that violate Single Responsibility Principle | 🔴 Critical |\n\n#### 📊 Comprehensive Code Quality Metrics\n\n**Maintainability Index Calculation**\n```\nMaintainability Score = 100 - (Defect Count × 5) - (Severity Weight × 2) - (Complexity Penalty)\n```\n\n**Metrics Analyzed:**\n- **Cyclomatic Complexity**: Control flow complexity measurement\n- **Lines of Code (LOC)**: Method and class size analysis\n- **Coupling Metrics**: Afferent/Efferent coupling analysis\n- **Cohesion Metrics**: LCOM (Lack of Cohesion in Methods)\n- **Depth of Inheritance**: Inheritance hierarchy analysis\n- **Number of Methods/Properties**: Class interface complexity\n- **Testability Index**: Code testability assessment\n\n#### 🎯 Smart Severity Classification\n\n- **🔴 Critical**: Immediate refactoring required (health score \u003c 0.5)\n- **🟡 High**: Should be addressed soon (0.5 ≤ score \u003c 0.7)\n- **🟢 Medium**: Consider refactoring when possible (0.7 ≤ score \u003c 0.8)\n- **🔵 Low**: Minor improvements suggested (0.8 ≤ score \u003c 1.0)\n\n## 📖 Usage Guide \u0026 Examples\n\n### 🛠️ Installation \u0026 Setup\n\n#### System Requirements\n- **Swift**: 6.0 or later\n- **Platform**: macOS 14.0+\n- **Memory**: 512MB minimum, 1GB recommended\n- **Storage**: 50MB for installation\n\n#### Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/your-username/ast-analyzer.git\ncd ast-analyzer\n\n# Build the project\nswift build --configuration release\n\n# Run tests (optional)\nswift test\n```\n\n#### Installing Globally (Recommended)\n\n```bash\n# Build and install\nswift build --configuration release\nsudo cp .build/release/ASTAnalyzer /usr/local/bin/\n\n# Verify installation\nast-analyzer --help\n```\n\n### 🎮 Command Line Interface\n\n#### Basic Syntax\n```bash\nast-analyzer [OPTIONS] \u003cPATH\u003e\n```\n\n#### Command Line Options\n\n| Option | Description | Example |\n|--------|-------------|---------|\n| `--json [DIR]` | Export results to JSON format in timestamped folders | `--json ./reports` |\n| `--markdown [DIR]` | Export results to Markdown format in timestamped folders | `--markdown ./reports` |\n| `--help` | Display help information | `--help` |\n| `--version` | Show version information | `--version` |\n\n#### Analysis Targets\n- **Single File**: Analyze individual Swift source files\n- **Directory**: Recursively analyze all Swift files in a directory\n- **Project**: Analyze entire Xcode projects or Swift packages\n\n### 📝 Usage Examples\n\n#### 🔍 Single File Analysis\n```bash\n# Analyze a specific Swift file\nswift run ASTAnalyzer Sources/App/ViewController.swift\n\n# Analyze with JSON export\nswift run ASTAnalyzer Sources/App/Model.swift --json ./analysis-reports\n\n# Analyze with Markdown export\nswift run ASTAnalyzer Sources/App/ViewController.swift --markdown ./reports\n```\n\n#### 📁 Directory Analysis\n```bash\n# Analyze entire project directory\nswift run ASTAnalyzer ./Sources --json ./project-analysis\n\n# Analyze specific module\nswift run ASTAnalyzer Sources/Core/ --json ./core-analysis\n\n# Analyze with both JSON and Markdown export\nswift run ASTAnalyzer ./Sources --json ./json-reports --markdown ./markdown-reports\n```\n\n#### 📊 Export Examples\n```bash\n# JSON export to custom directory\nswift run ASTAnalyzer ./MyApp --json ./quality-reports\n\n# Markdown export to current directory\nswift run ASTAnalyzer File.swift --markdown\n\n# Combined exports\nswift run ASTAnalyzer ./Sources --json ./json-output --markdown ./markdown-output\n```\n\n### 📋 Sample Output\n\n#### Console Report Format\n```\n🔍 Architectural Analysis Report\n============================================================\n📄 File: ViewController.swift\n📍 Path: Sources/App/ViewController.swift\n📊 Lines: 245\n⏱️  Analysis Time: 0.023s\n\n📈 SUMMARY:\n------------------------------\n🚨 Critical Issues: 2\n⚠️  High Priority: 3\n📊 Total Defects: 7\n🎯 Maintainability Score: 68.5/100\n🟡 STATUS: Needs attention\n\n🚨 CRITICAL ISSUES:\n----------------------------------------\n• Class 'ViewController' has multifaceted abstraction (LCOM5: 0.95, WMC: 18, NOF: 8, NOM: 18)\n  💡 Split into smaller classes, each handling a single responsibility\n\n⚠️ HIGH PRIORITY:\n------------------------------\n• File contains 245 lines - exceeds recommended maximum of 200\n  💡 Split into multiple files with related functionality\n• Method 'viewDidLoad' contains 67 lines - too large\n  💡 Break down into several smaller methods\n```\n\n#### JSON Export Structure\n```\nanalysis-reports/\n└── analysis_2025-12-14_14-30-15/\n    ├── God_Class.json\n    ├── Long_Method.json\n    ├── Massive_View_Controller.json\n    ├── Multifaceted_Abstraction.json\n    └── summary.json\n```\n\n#### Markdown Export Structure\n```\nmarkdown-reports/\n└── analysis_2025-12-14_14-30-15/\n    ├── God_Class.md\n    ├── Long_Method.md\n    ├── Massive_View_Controller.md\n    ├── Multifaceted_Abstraction.md\n    └── README.md  # Summary report\n```\n\n## ⚙️ Configuration \u0026 Customization\n\n### 🔧 Threshold Configuration\n\n**AST Analyzer** uses configurable thresholds based on academic research and industry best practices. Customize detection sensitivity through the `Thresholds` configuration:\n\n#### Academic Thresholds (Default)\n```swift\nlet academicThresholds = Thresholds.academic\n// God Class: WMC \u003e 47, TCC \u003c 0.33, ATFD \u003e 5, LOC \u003e 500\n// Long Method: LOC \u003e 50, CC \u003e 10, NOI \u003e 30\n// Multifaceted Abstraction: LCOM \u003e 0.725, WMC \u003e 34\n```\n\n#### Lenient Thresholds\n```swift\nlet lenientThresholds = Thresholds.lenient\n// More permissive thresholds for legacy codebases\n```\n\n#### Strict Thresholds\n```swift\nlet strictThresholds = Thresholds.strict\n// Aggressive detection for new projects\n```\n\n#### Team-Specific Configurations\n\nThe analyzer now includes specialized configurations for different team types and organizational contexts:\n\n```swift\n// Startup teams - lenient for fast development\nlet startupThresholds = try Thresholds.startup()\n\n// Enterprise teams - strict compliance and maintainability\nlet enterpriseThresholds = try Thresholds.enterprise()\n\n// Research teams - academic-level scrutiny\nlet researchThresholds = try Thresholds.research()\n\n// Legacy codebases - very lenient for existing projects\nlet legacyThresholds = try Thresholds.legacy()\n\n// Mobile development - iOS/Swift optimized\nlet mobileThresholds = try Thresholds.mobile()\n```\n\nEach configuration is tailored to specific development contexts:\n- **Startup**: Prioritizes development velocity with more lenient thresholds\n- **Enterprise**: Emphasizes code quality and maintainability for large organizations\n- **Research**: Provides thorough analysis for academic and research environments\n- **Legacy**: Accommodates existing codebases that can't be immediately refactored\n- **Mobile**: Optimized for iOS/Swift development patterns and constraints\n\n#### Developer Experience Level Configurations\n\nThe analyzer also provides configurations tailored to different developer experience levels:\n\n```swift\n// Junior developers - supportive learning environment\nlet juniorThresholds = try Thresholds.junior()\n\n// Middle developers - balanced professional standards\nlet middleThresholds = try Thresholds.middle()\n\n// Senior developers - expert-level code quality standards\nlet seniorThresholds = try Thresholds.senior()\n```\n\n**Experience Level Characteristics:**\n- **Junior**: More lenient thresholds to support learning and avoid overwhelming new developers\n- **Middle**: Balanced thresholds based on academic research, suitable for experienced developers\n- **Senior**: Strict thresholds for expert developers who can handle complex refactoring\n\n#### Custom Configuration\n```swift\nlet customConfig = Thresholds(\n    classSmells: ClassSmellThresholds(\n        godClassWMC: 40,           // Weighted Methods per Class\n        godClassTCC: 0.4,          // Tight Class Cohesion\n        godClassATFD: 4,           // Access To Foreign Data\n        godClassLOC: 400,          // Lines of Code\n        mfaLCOM: 0.8,             // Lack of Cohesion in Methods\n        mfaWMC: 30,               // Multifaceted Abstraction WMC\n        mfaNOF: 6,                // Number of Fields\n        mfaNOM: 12,               // Number of Methods\n        deficientEncapsulationWOA: 0.25, // Weakness of Abstraction\n        lazyClassNOM: 3,          // Lazy Class Methods\n        lazyClassNOF: 3,          // Lazy Class Fields\n        lazyClassDIT: 1           // Depth of Inheritance Tree\n    ),\n    methodSmells: MethodSmellThresholds(\n        longMethodLOC: 40,        // Long Method Lines\n        longMethodCC: 8,          // Cyclomatic Complexity\n        longMethodNOI: 25         // Number of Instructions\n    )\n)\n```\n\n### 📤 JSON Export Configuration\n\nThe `--json` flag enables comprehensive JSON export with the following features:\n\n#### Export Structure\n- **Timestamped Directories**: `analysis_YYYY-MM-DD_HH-MM-SS/`\n- **Organized by Smell Type**: Separate JSON files for each defect category\n- **Summary Report**: Consolidated analysis metadata and statistics\n- **Detailed Instances**: Complete defect information with locations and suggestions\n\n#### JSON Schema\n```json\n{\n  \"summary\": {\n    \"totalSmells\": 15,\n    \"healthScore\": 0.75,\n    \"healthScorePercentage\": \"75.0%\",\n    \"healthStatus\": \"Fair\",\n    \"requiresRefactoring\": true,\n    \"criticalSmellsCount\": 3\n  },\n  \"smellsByType\": [\n    {\n      \"type\": \"God Class\",\n      \"count\": 2,\n      \"description\": \"A class that knows too much or does too much\"\n    }\n  ],\n  \"recommendations\": [\"Refactor large classes into smaller components\"],\n  \"metadata\": {\n    \"timestamp\": \"2025-12-14T14:30:15Z\",\n    \"duration\": 0.023,\n    \"filesAnalyzed\": 5,\n    \"classesAnalyzed\": 12,\n    \"methodsAnalyzed\": 45\n  }\n}\n```\n\n## 🛠️ Extending \u0026 Customizing the Analyzer\n\n**AST Analyzer** is designed for extensibility, allowing developers to add custom defect detectors, output formats, and analysis rules. The modular architecture supports plugin-based extensions and custom integrations.\n\n### 🔧 Adding Custom Defect Detectors\n\n#### Step 1: Implement the DefectDetector Protocol\n\nCreate a new detector class that analyzes specific code patterns:\n\n```swift\nimport SwiftSyntax\n\nfinal class CustomSmellDetector: DefectDetector {\n    let detectableDefects: [DefectType] = [.customSmell]\n\n    func detectDefects(in sourceFile: SourceFileSyntax, filePath: String) -\u003e [SmellInstance] {\n        var defects: [SmellInstance] = []\n\n        // Traverse the AST and detect custom patterns\n        let visitor = CustomSmellVisitor()\n        visitor.walk(sourceFile)\n\n        for violation in visitor.violations {\n            let defect = SmellInstance(\n                type: .customSmell,\n                element: .class(name: violation.className),\n                severity: violation.severity,\n                location: Location(\n                    filePath: filePath,\n                    lineNumber: violation.lineNumber,\n                    context: violation.context\n                ),\n                message: violation.message,\n                suggestion: violation.suggestion\n            )\n            defects.append(defect)\n        }\n\n        return defects\n    }\n}\n\nprivate class CustomSmellVisitor: SyntaxVisitor {\n    var violations: [CustomViolation] = []\n\n    override func visit(_ node: ClassDeclSyntax) -\u003e SyntaxVisitorContinueKind {\n        // Analyze class declarations for custom patterns\n        let className = node.name.text\n        let methodCount = node.members.members.count\n\n        if methodCount \u003e 20 {  // Custom rule\n            violations.append(CustomViolation(\n                className: className,\n                severity: 0.7,\n                lineNumber: node.position.line,\n                context: \"class \\(className)\",\n                message: \"Class '\\(className)' has too many methods (\\(methodCount))\",\n                suggestion: \"Consider splitting this class into smaller components\"\n            ))\n        }\n\n        return .visitChildren\n    }\n}\n```\n\n#### Step 2: Register the Detector\n\nAdd your custom detector to the dependency injection container:\n\n```swift\n// In Container.swift\nregister(AnalysisCoordinator.self) { container in\n    let detectors: [DefectDetector] = [\n        MultifacetedAbstractionDetector(),\n        InsufficientModularizationDetector(),\n        DeficientEncapsulationDetector(),\n        GodClassDetector(),\n        LazyClassDetector(),\n        LongMethodDetector(),\n        MassiveViewControllerDetector(),\n        CustomSmellDetector(),  // Your custom detector\n        // ... other detectors\n    ]\n    return AnalysisCoordinator(defectDetectors: detectors)\n}\n```\n\n### 🎨 Adding Custom Output Formats\n\n#### Implementing Custom Presenters\n\nCreate new output formats by implementing the presenter protocols:\n\n```swift\nfinal class HTMLAnalysisResultPresenter: AnalysisResultPresenter {\n    func present(result: AnalysisResult) {\n        let html = generateHTML(for: result)\n        let outputPath = \"analysis-report.html\"\n        try html.write(toFile: outputPath, atomically: true, encoding: .utf8)\n        print(\"📄 HTML report generated: \\(outputPath)\")\n    }\n\n    private func generateHTML(for result: AnalysisResult) -\u003e String {\n        // Generate comprehensive HTML report\n        return \"\"\"\n        \u003c!DOCTYPE html\u003e\n        \u003chtml\u003e\n        \u003chead\u003e\n            \u003ctitle\u003eAST Analysis Report - \\(result.sourceFile.filePath)\u003c/title\u003e\n            \u003cstyle\u003e\n                body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n                .critical { color: #dc3545; }\n                .high { color: #fd7e14; }\n                .medium { color: #ffc107; }\n                .low { color: #28a745; }\n            \u003c/style\u003e\n        \u003c/head\u003e\n        \u003cbody\u003e\n            \u003ch1\u003eArchitectural Analysis Report\u003c/h1\u003e\n            \u003ch2\u003e\\(result.sourceFile.filePath)\u003c/h2\u003e\n            \u003cp\u003e\u003cstrong\u003eScore:\u003c/strong\u003e \\(result.maintainabilityScore)/100\u003c/p\u003e\n            \u003c!-- Detailed HTML content --\u003e\n        \u003c/body\u003e\n        \u003c/html\u003e\n        \"\"\"\n    }\n}\n```\n\n#### Supported Export Formats\n- **Console**: Human-readable terminal output with emojis and colors\n- **JSON**: Structured data export for CI/CD integration and tooling\n- **Markdown**: Documentation-friendly format for GitHub/GitLab integration\n- **HTML**: Web-viewable reports with interactive elements\n- **XML**: Machine-readable format for enterprise tools\n- **CSV**: Spreadsheet-compatible tabular data\n\n### 🔌 Integration APIs\n\n#### CI/CD Integration\n```bash\n# In GitHub Actions\n- name: Code Quality Analysis\n  run: |\n    swift run ASTAnalyzer ./Sources --json ./reports\n    # Parse JSON reports for quality gates\n    if [ $(jq '.summary.healthScore \u003c 0.7' ./reports/analysis_*/summary.json) = \"true\" ]; then\n        echo \"Code quality below threshold\"\n        exit 1\n    fi\n```\n\n#### Custom Tool Integration\n```swift\nimport ASTAnalyzer\n\nlet analyzer = ProjectSmellAnalyzer(thresholds: .strict)\nlet report = try await analyzer.analyze(sourceFiles: sourceFiles)\n\n// Process results programmatically\nfor smell in report.smellsByClass.values.flatMap({ $0 }) {\n    switch smell.type {\n    case .godClass:\n        // Handle God Class detection\n        break\n    case .longMethod:\n        // Handle Long Method detection\n        break\n    // ... handle other smell types\n    }\n}\n```\n\n## Requirements\n\n- Swift 6.2+\n- macOS 14+\n\n## Dependencies\n\n- [SwiftSyntax](https://github.com/swiftlang/swift-syntax): For parsing Swift source code\n\n## License\n\nThis project demonstrates Clean Architecture principles for Swift applications.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbivex%2Fminiature-palm-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbivex%2Fminiature-palm-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbivex%2Fminiature-palm-tree/lists"}