A little cli tool to help you fill your variables type
.
And add private final
attribute to @IBAction
, @IBOutlet
, and @objc
.(Rewriting ...)
brew install make
make install
swift build -c release
cp .build/release/typefill /usr/local/bin
brew install mint
mint install yume190/TypeFill
typefill single --sdk macosx --file PATH/TO/sample.swift
typefill spm --module TypeFillKit --file .
typefill project --module YOUR_SCHEME --file PATH/TO/YOUR.xcodeproj
typefill workspace --module YOUR_SCHEME --file PATH/TO/YOUR.xcworkspace
- 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 }
}
}()