SwiftInfo  by rockbruno

CLI tool for Swift app code analysis and metrics tracking

created 6 years ago
1,159 stars

Top 34.1% on sourcepulse

GitHubView on GitHub
Project Summary

SwiftInfo is a command-line tool designed for iOS developers to extract, track, and analyze code metrics and build statistics. It helps monitor the evolution of an app's codebase over time, providing insights into size, code coverage, test counts, build durations, and more, with the goal of improving development workflows and identifying potential issues.

How It Works

SwiftInfo operates by parsing build logs generated by Xcode's build system. It leverages providers, which are specific modules designed to extract particular metrics (e.g., IPA size, code coverage, lines of code). Users configure SwiftInfo via an Infofile.swift script, specifying log file paths and the desired providers. The tool can integrate with build automation tools like fastlane or be used with manually captured xcodebuild logs.

Quick Start & Requirements

  • Installation:
    • CocoaPods: pod 'SwiftInfo'
    • Homebrew: brew tap rockbruno/SwiftInfo && brew install rockbruno/SwiftInfo/swiftinfo
    • Manual: Download latest release.
  • Prerequisites: Requires access to Xcode build logs. Integration with fastlane (via scan and gym with buildlog_path) is recommended.
  • Configuration: Requires an Infofile.swift in the project root.
  • Resources: Swift Package Manager is not supported.
  • Demo: Example project included in the repository (make swiftinfo in example folder).

Highlighted Details

  • Supports 12 default providers for various metrics, with extensibility for custom providers.
  • Integrates with danger-SwiftInfo for pull request analysis.
  • Outputs data to JSON for version control and can be visualized with SwiftInfo-Reader.
  • Allows custom arguments for flexible run configurations.

Maintenance & Community

The project README states: "I don't intend to ship further updates to this tool."

Licensing & Compatibility

MIT License. Compatible with commercial and closed-source projects.

Limitations & Caveats

The project is in maintenance mode with no plans for further updates. Swift Package Manager is not supported.

Health Check
Last commit

2 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.