TypeFill
A little cli tool to help you fill your variables type
.
And add private final
attribute to @IBAction
, @IBOutlet
, and @objc
.(Rewriting ...)
Installation
make
brew install make
make install
Swift Package Manager
swift build -c release
cp .build/release/typefill /usr/local/bin
mint
brew install mint
mint install yume190/TypeFill
Usage
typefill single --filePath /ABSOLUTE/PATH/sample.swift --sdk macosx
typefill spm --moduleName TypeFillKit
typefill project --project PATH/TO/YOUR.xcodeproj --scheme YOUR_SCHEME
typefill workspace --workspace PATH/TO/YOUR.xcworkspace --scheme YOUR_SCHEME
The Support Part & Todolist
- typefill variables like
let a = 1
orvar a = "1"
. - typefill keyword like
let ``default`` = 1
. - typefill
guard let
andif let
. - typefill some closure input.
{ a, b in }
{ (a, b) in }
- typefill binding tuple
let (aa, bb) = (1, 2)
- typefill
inout
- typefill closure output.
-
addprivate final
attribute to@IBAction/@IBOutlet/@objc
by using--ibaction/--iboutlet/--objc
.(Rewriting)
private lazy var chartHeight: [CGFloat] = {
return self.status.sensorData?.compactMap { sensor -> CGFloat in
guard let _chartType = sensor.chart?.type else { return 0 }
}
}()
Ref
License
MIT licensed.