Search code examples
swiftxcodedocumentationjazzy

Jazzy is unable to parse .swift file


I'm trying to create documentation of an Xcode project and I've encountered really weird a problem that I am just not able to solve.

I downloaded Jazzy as a tool for creating documentation. I commented / documented several files with no problem, but with one it just wouldn't parse it. I've read several Github and StackOverflow threads but none solved my problem. I tried messing with access level flags, force including and even excluding file from jazzy and reinstalling entire jazzy. None of the above worked.

When I try to run jazzy --min-acl internal (or just any access level or just jazzy) in my project it parses 13/39 files. At number 14 it stops and throws this error:

Parsing LoginViewController.swift (14/39)
from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.10.0/lib/jazzy/sourcekitten.rb:230:in `run_sourcekitten'
from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.10.0/lib/jazzy/doc_builder.rb:65:in `block in build'
from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.10.0/lib/jazzy/doc_builder.rb:63:in `chdir'
from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.10.0/lib/jazzy/doc_builder.rb:63:in `build'
from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.10.0/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:22:in `load'
from /usr/local/bin/jazzy:22:in `<main>'

This all is really confusing to me, knowing that beforehand it all worked just fine. That would imply I broke something, I am not aware of changing any settings whatsoever. I only changed some code in the middle of writing the documentation. But it seems really strange that that would be the reason behind it. In addition - already documented files work just fine, just this one does not.

Any tip or help would be much appreciated! Thanks


Solution

  • I had comment that said

    //MARK - TextField delegate methods
    

    instead of

    //MARK: - TextField delegate methods
    

    even though how stupid can this sound, it seems to have been causing this problem.