All Projects → matsoftware → Swift Code Metrics

matsoftware / Swift Code Metrics

Licence: mit
Code metric analyzer for Swift projects.

Programming Languages

python
139335 projects - #7 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Swift Code Metrics

Pcp
Performance Co-Pilot
Stars: ✭ 716 (+193.44%)
Mutual labels:  analysis, metrics
Wallace Cli
Pretty CSS analytics on the CLI
Stars: ✭ 281 (+15.16%)
Mutual labels:  analysis, metrics
Dg
[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
Stars: ✭ 242 (-0.82%)
Mutual labels:  dependency-graph, analysis
Objc Dependency Visualizer
Objective-C and Swift dependency visualizer. It's tool that helps to visualize current state of your project. It's really easy to see how tight your classes are coupled.
Stars: ✭ 1,738 (+612.3%)
Mutual labels:  dependency-graph, dependency
Dart Code Metrics
Software analytics tool that helps developers analyse and improve software quality.
Stars: ✭ 96 (-60.66%)
Mutual labels:  analysis, metrics
Dotnet Assembly Grapher
Reverse engineering and software quality assurance tool for .NET assemblies
Stars: ✭ 21 (-91.39%)
Mutual labels:  dependency-graph, analysis
gochk
Static Dependency Analysis Tool for Go Files
Stars: ✭ 68 (-72.13%)
Mutual labels:  analysis, dependency
I Codecnes
i-Code CNES is a static code analysis tool to help developpers write code compliant with CNES coding rules.
Stars: ✭ 33 (-86.48%)
Mutual labels:  analysis, metrics
Kotlin Mvvm Architecture
Android Architecture Design Patterns using Kotlin, MVVM, Dagger2, LiveData, Room, MediatorLiveData, NetworkBoundResources, Retrofit, AndroidX, ViewModels, Dependency Injection using Dagger2, Repository pattern.
Stars: ✭ 126 (-48.36%)
Mutual labels:  dependency-graph, architecture
Warp10 Platform
The Most Advanced Time Series Platform
Stars: ✭ 227 (-6.97%)
Mutual labels:  analysis, metrics
Dry System
Organize your code into reusable components
Stars: ✭ 228 (-6.56%)
Mutual labels:  architecture
Quiz App
A repository reflecting the progress made on the "How to Build iOS Apps with Swift, TDD & Clean Architecture" YouTube series, by Caio & Mike.
Stars: ✭ 230 (-5.74%)
Mutual labels:  architecture
Go2sky
Distributed tracing and monitor SDK in Go for Apache SkyWalking APM
Stars: ✭ 234 (-4.1%)
Mutual labels:  metrics
Adr Tools
Command-line tools for working with Architecture Decision Records
Stars: ✭ 3,073 (+1159.43%)
Mutual labels:  architecture
Module Linker
browse modules by clicking directly on "import" statements on GitHub ⛺
Stars: ✭ 229 (-6.15%)
Mutual labels:  dependency-graph
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (+1029.92%)
Mutual labels:  metrics
Newandroidarchitecture Component Github
Sample project based on the new Android Component Architecture
Stars: ✭ 229 (-6.15%)
Mutual labels:  architecture
Statix
Fast and reliable Elixir client for StatsD-compatible servers
Stars: ✭ 228 (-6.56%)
Mutual labels:  metrics
Streamalert
StreamAlert is a serverless, realtime data analysis framework which empowers you to ingest, analyze, and alert on data from any environment, using datasources and alerting logic you define.
Stars: ✭ 2,634 (+979.51%)
Mutual labels:  analysis
Vqmt
VQMT: Video Quality Measurement Tool. Fast implementations of the following objective image quality metrics: PSNR, SSIM, MS-SSIM, VIFp, PSNR-HVS and PSNR-HVS-M.
Stars: ✭ 241 (-1.23%)
Mutual labels:  metrics

FOSSA Status License Build Status codecov Codacy Badge PyPI

swift-code-metrics

Code metrics analyzer for Swift projects.

Example code distribution Example deviation main sequence
Example internal distribution

Introduction

The goal of this software is to provide an insight of the architectural state of a software written in Swift that consists in several modules. Inspired by the book of Robert C. Martin, Clean Architecture, the software will scan the project to identify the different components in order to assess several common code metrics in the software industry:

  • the overall number of concrete classes and interfaces
  • the instability and abstractness of the framework
  • the distance from the main sequence
  • LOC (Lines Of Code)
  • NOC (Numbers Of Comments)
  • POC (Percentage Of Comments)
  • NOM (Number of Methods)
  • Number of concretes (Number of classes and structs)
  • NOT (Number Of Tests)
  • NOI (Number Of Imports)
  • Frameworks dependency graph (number of internal and external dependencies)

Requirements

This is a Python 3 script that depends on matplotlib, adjustText, pyfunctional and pygraphviz.

This latest package depends on the Graphviz binary that must be installed.

Usage

The package is available on pip with pip3 install swift-code-metrics.

The syntax is:

swift-code-metrics --source <path-to-swift-project> --artifacts <output-directory> --exclude <excluded-folders> --tests-paths <test-paths> --generate-graphs

  • --source is the path to the folder that contains the main Xcode project or Workspace
  • --artifacts path to the folder that will contain the generated output.json report
  • --exclude (optional) space separated list of path substrings to exclude from analysis (e.g. Tests will ignore all files/folders that contain Tests)
  • --tests-paths (default: Test Tests) space separated list of path substrings matching test classes
  • --generate-graphs (optional) if passed, it will generate the graphs related to the analysis and save them in the artifacts folder

Documentation

Please follow the guide with a practical example to get started.

Current limitations

  • This tool is designed for medium/large codebases composed by different frameworks. The script will scan the directory and it will identify the frameworks by the name of the 'root' folder, so it's strictly dependent on the file hierarchy (unless a project path override file is specified)

  • Libraries built with spm are not supported.

  • The framework name is inferred using the directory structure. If the file is in the root dir, the default_framework_name will be used. No inspection of the xcodeproj will be made.

  • The list of methods currently doesn't support computed vars

  • Inline comments in code (such as struct Data: {} //dummy data) are currently not supported

  • Only XCTest test frameworks are currently supported

TODOs

  • Code improvements
  • Other (open to suggestions)

Contact

Mattia Campolese

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].