Skip to content

imaizume/code-complexity-in-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages