imaizume / code-complexity-in-swift

Swift playground for testing code complexity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Code for Reducing Code Complexity Nunmber (CCN)

This is a repogitory of sample codes presented in Otemachi.swift #03 by @imaizume.

  1. AvoidUnncessaryOptional.swift
  2. UserStructInSteadOfEnum.swift
  3. MakeModuleProtocolOriented.swift

How to Calcurate CCN

Using lizard, you can see CCNs for each method with:

lizard ./code-complexity.playground/Sources

LICENSE

MIT


循環的複雑度(CCN)を減らすコードのサンプル

このリポジトリはOtemachi.swift #03にて@imaizumeが発表したサンプルコードです。

  1. AvoidUnncessaryOptional.swift
  2. UserStructInSteadOfEnum.swift
  3. MakeModuleProtocolOriented.swift

CCNの算出方法

lizardを使い、以下のコマンドでメソッド毎のCCNを算出可能です。

lizard ./code-complexity.playground/Sources

ライセンス

MIT

About

Swift playground for testing code complexity.

License:MIT License


Languages

Language:Swift 100.0%