Getting started with Klocwork Desktop for Java
Getting started with Klocwork Desktop for JavaKlocwork Desktop helps you detect and fix issues before check-in. Klocwork Desktop is a GUI alternative to the command-line desktop analysis tool, kwcheck. Like kwcheck, Klocwork Desktop is for developers using IDEs and text editors that aren't supported in the form of an IDE plug-in. Note: If you access your source code and compilers remotely, use Klocwork Desktop in remote mode .
Set up a local projectFor each coherent, buildable component that you work on, create a local project -- a repository for your analysis results and settings. You need to set up a project only once for each component you work on. You get the most from static code analysis when you connect a small local project to a larger project on the Klocwork Server. The small local project is analyzed quickly while incorporating Klocwork knowledge bases generated on the server where additional source files were analyzed (for example, shared libraries). Connecting to a server project also allows you to share issue status information with the integration build analysis and among team members. You can run a standalone desktop analysis, but the analysis only derives knowledge from the local project's source files. You perform this step only once for each project. Project setup includes capturing build settings. Klocwork uses a build specification to perform an analysis. The build specification contains a list of the project's source files and their compiler options (includes and defines).
Analyze your codeIn Klocwork Desktop, you should now see a list of files in the Project Navigator.
You see the analysis output in the Log Console, and if issues are detected, you see the Issues view with a list of issues. Investigate detected issues
Fix defects and ignore the restFor a real defect:
For an issue that doesn't need to be fixed:
If you're connected to a project on the Klocwork Server, your changes are now visible to other developers, and in Klocwork Static Code Analysis. Your desktop project is also updated with any changes made by other developers. This happens even before another integration build analysis has been run. Keep your build specification up to dateWhenever you add files or change build settings, recreate your build specification with kwant. Save the build specification to your .kwlp directory. If your build specification is out of date, the analysis will not be accurate. |