Skip to content

Commit

Permalink
Include parse errors in the JSON output (closes #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Dec 26, 2014
1 parent 64df462 commit 0f92549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ None.
[JP Simard](https://github.com/jpsim)
[realm/jazzy#125](https://github.com/realm/jazzy/issues/125)

* Include parse errors in the JSON output.
[JP Simard](https://github.com/jpsim)
[#16](https://github.com/jpsim/sourcekitten/issues/16)

##### Bug Fixes

* Fixed crash when files contained a declaration on the first line.
Expand Down
1 change: 1 addition & 0 deletions sourcekitten/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ func printSwiftDocs(xcodebuildOutput: String) {
}
}
printSTDERR("\(file.lastPathComponent) could not be parsed. Please open an issue at https://github.com/jpsim/sourcekitten/issues with the file contents.")
results.append(["sourcekitten_error": "\(file.lastPathComponent) could not be parsed"])
}
if let jsonData = NSJSONSerialization.dataWithJSONObject(results, options: .PrettyPrinted, error: nil) {
if let jsonString = NSString(data: jsonData, encoding: NSUTF8StringEncoding) {
Expand Down

0 comments on commit 0f92549

Please sign in to comment.