     // Collects all the line numbers containing var or let declarations
     private func varLetLineNumbers(file: SwiftLintFile,
                                    structure: [SourceKittenDictionary],
-                                   attributeLines: inout Set<Int>) -> Set<Int> {
-        var result = Set<Int>()
-
+                                   attributeLines: inout Set<Int>,
+                                   collectingInto result: inout Set<Int>) {
         for statement in structure {
             guard statement.kind != nil,
                   let (startLine, endLine) = lineOffsets(file: file, statement: statement) else {

            let substructure = statement.substructure

            if !substructure.isEmpty {
                result.formUnion(varLetLineNumbers(file: file,
                                                   structure: substructure,
                                                   attributeLines: &attributeLines))
            }
        }
        return result
    }

    // Collects all the line numbers containing comments or #if/#endif

private extension SwiftLintFile {
    // Zero based line number for specified byte offset
    func line(byteOffset: Int) -> Int {
        let lineIndex = lines.firstIndexAssumingSorted { line in
            return line.byteRange.location > byteOffset
        }
        return (lineIndex ?? 0 ) - 1
    }
}
