     }
 
     public func correctFile(file: File) -> [Correction] {
-        guard let newLineCount = file.contents.leadingNewlineCount() where newLineCount != 0  else {
+        guard let spaceCount = file.contents.leadingNewlineAndWhiteSpaceCount()
+            where spaceCount != 0  else {
             return []
         }
         let region = file.regions().filter {

        }
        return count
    }
    private func leadingNewlineCount() -> Int? {
        return countOfLeadingCharactersInSet(NSCharacterSet.newlineCharacterSet())
    }
}


            return []
        }
        file.write(file.contents.substringFromIndex(
                file.contents.startIndex.advancedBy(spaceCount)))

        let location = Location(file: file.path, line: max(file.lines.count, 1))
        return [Correction(ruleDescription: self.dynamicType.description, location: location)]
