The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
For a function that takes a closure as default value, the array of
parameter reported by sourcekit also includes the parameters of that
closure.
In other words, a function like
func foo(param1: Int,
param2: Bool,
param3: (Int) -> Void = { (x: Int) in }) { }
reports 4 parameters (param 1, param2, param3, and x).
This commit uses the bounds of the method/function parameters to filter
out parameters within parameters. Below, a 1, a 2, and a 3 would be
filtered out since they're inside parameter 3.
----------------------------------------------------------------|
| |---------| |---------| |----------------------------| |
| | param 1 | | param 2 | | param 3: |a 1| |a 2| |a 3| | |
| |---------| |---------| |----------------------------| |
----------------------------------------------------------------|