AppCode performs code analysis by applying inspections to your code. Numerous code inspections exist for Objective-C, C and C++ and for the other supported languages.
The integrated Clang Analyzer provides additional 2000+ code inspections.
The inspections detect not only compiling errors, but also different code inefficiencies. Whenever you have some unreachable code, unused code, non-localized string, unresolved method, memory leaks or even spelling problems – you'll find it very quickly.
AppCode's code analysis is flexibly configurable. You can enable/disable each code inspection and change its severity, create profiles with custom sets of inspections, apply inspections differently in different scopes, suppress inspections in specific pieces of code, and more.
The analysis can be performed in several ways:
- By default, AppCode analyses all open files and highlights all detected code issues right in the editor. On the right side of the editor you can see the analysis status of the whole file (the icon in the top-right corner).
When an error is detected, this icon is ; in case of a warning, it is ; if everything is correct, the icon is .
- Alternatively, you can run code analysis in a bulk mode for the specified scope, which can be as large as the whole project.
- If necessary, you can apply a single code inspection in a specific scope.
For the majority of the detected code issues, AppCode provides quick fix suggestions. You can quickly review errors in a file by navigating from one highlighted line to another by pressing F2/⇧+F2.