banjun / bansan

:eyes: bansan checks swift code structures instead of your eyes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bansan

bansan checks swift code structures instead of your eyes.

xcode-integration

Checks Implemented

  • requirements for super call of:
    • viewDidLoad()
    • viewWillAppear(_:)
    • viewDidAppear(_:)
    • viewWillDisappear(_:)
    • viewDidDisappear(_:)
  • lazy var initialization caused in deinit whose initialization expression contains reference to self

Usage

Command Line

bansan.swift is executable. Swift Package Manager will setup all for you.

git clone https://github.com/banjun/bansan.git
cd bansan
./bansan.swift YourViewController.swift

Xcode

ln -s /path/to/bansan.swift /path/to/bin/bansan

Add build phase to xcodeproject in current working directory:

bansan setup

or

Manually add Run Script Build Phase executed by /bin/zsh:

if which bansan >/dev/null; then
bansan ${SRCROOT}/**/*.swift
else
echo "warning: bansan does not exist, download from https://github.com/banjun/bansan"
fi

About

:eyes: bansan checks swift code structures instead of your eyes

License:MIT License


Languages

Language:Shell 83.9%Language:Ruby 8.4%Language:Swift 7.7%