Static Analyzer
Tizen Static Analyzer is a source code analysis tool that finds bugs in Tizen applications:
-
Running the Static Analyzer
Describes how to launch the Tizen Static Analyzer with your application.
-
Selecting Checkers
Describes how to select the checkers you want for the static analysis of your project.
-
Viewing Static Analyzer Results
Describes how to view the results analyzed by Tizen Static Analyzer.
Running the Static Analyzer
To run a static analysis for your application:
-
In the Project Explorer view, right-click the project and select Check Potential Bugs with Build.
- View the analysis results in the Potential Bugs view on the right side.
You can also enable the LLVM Static Analyzer to be run during the build process by changing the setting in the project properties: Tizen SDK > Static Analysis.
Figure: Static analysis properties
Selecting Checkers
A list of checkers can be selected for static analysis. For a new project, all the checkers are selected by default.
To select checkers for your application:
- In the Project Properties view, select Static Analysis.
- You can selectively set checkers for your project from the list. Selecting or clearing a checker selects or clears all the sub-checkers.
- To obtain more information on a checker, hover over it.
Viewing Static Analyzer Results
The Tizen Static Analyzer results are displayed in the Potential Bug view after the analysis is completed.
The Potential Bug view opens automatically, when you make a build or check potential bugs. To open the Potential Bugs explicitly:
- Go to Windows > Show View > Other.
- Type Potential Bugs.
- Select Potential Bugs and click OK.
Figure: Opening the Potential Bug view
In the Potential Bug view, you can group the warnings based on type or file. You can also select any particular bug and expand it to see the complete flow, which resulted in the issue.
Figure: Static Analyzer results