TypeFill

master

A cli tool to fill your swift source code's types.
yume190/TypeFill

TypeFill

Quality gate Swift


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 or var a = "1".
  • typefill keyword like let ``default`` = 1.
  • typefill guard let and if let.
  • typefill some closure input.
    • { a, b in }
    • { (a, b) in }
  • typefill binding tuple let (aa, bb) = (1, 2)
  • typefill inout
  • typefill closure output.
  • add private 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.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Tue Nov 08 2022 03:42:25 GMT-0500 (GMT-05:00)