facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

[nuclide-swift] Display diagnostics for Swift source code #645

Open modocache opened 8 years ago

modocache commented 8 years ago

Flow can tell me when I write a bad line of JavaScript. nuclide-swift should be able to tell me when I write Swift code that won't compile.

This kind of works already. Check out the following screenshot:

screen shot 2016-07-14 at 3 25 51 am

SourceKitten tells me the type of raichu is "error type". This is because the Pokemon struct takes init parameters, but I do not pass those parameters when initializing raichu.

I believe SourceKit is capable of displaying error diagnostics for Swift files. I don't think SourceKitten wraps this functionality yet, but it should. Once it does, we should use that functionality and hook it up to the Nuclide diagnostics service.

thislooksfun commented 7 years ago

According to jpsim/SourceKitten#295, it's a problem with SourceKit itself, not SourceKitten.