Exercise 3: "Analyze Will Catch Bugs in My Swift Code" — Possible Solution =========================================================================== TASK State what the sources support, what they do not, and how you would find out for your own project. WHAT THE SOURCES SUPPORT - Xcode's static analyzer is the Clang static analyzer, run with Product -> Analyze or Shift-Command-B. - It finds hard-to-produce bugs without running the code and shows the steps where the bug occurs. - A summary says it finds bugs in C, C++ and Objective-C code, including in mixed projects, but does not directly analyze pure Swift code in current Xcode versions. WHAT THEY DO NOT SUPPORT That it analyzes Swift. The summary says the opposite, though I could not confirm it against Apple's documentation, and a WWDC21 session on the analyzer was not readable. HOW TO FIND OUT Write a small Swift function with an obvious problem, run Product -> Analyze, and see whether it reports anything. Then read Apple's current static analyzer documentation for your Xcode version. REWRITE "Analyze finds bugs in C-family code, and reportedly not in pure Swift; check with a test file in your own project."