Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Latest commit

 

History

History
42 lines (25 loc) · 2 KB

README.md

File metadata and controls

42 lines (25 loc) · 2 KB

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