没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Klocwork Build
Integration
Software release 8.0 SR1
Document version 4.0
Copyright © 1998-2008 Klocwork Inc.
All rights reserved
This document, as well as the software described in it, is furnished under license and may only be
used or copied in accordance with the terms of such license. The information contained herein is the
property of Klocwork Inc. and is confidential between Klocwork Inc. and the client and remains the
exclusive property of Klocwork Inc. No part of this documentation may be copied, translated, stored
in a retrieval system, or transmitted in any form or by any means, electronic, mechanical,
photocopying, recording or otherwise without the prior written permission of Klocwork Inc.
If you find any problems in the documentation, please report them to us in writing. Klocwork Inc.
does not warrant that this document is error-free.
Klocwork Inc. and Klocwork are registered trademarks and Klocwork Insight, Klocwork Solo, Klocwork Insight Architect, Klocwork Insight
Review, Klocwork Source Cross-Reference, Klocwork Management Console, Klocwork Developer for Java in Eclipse, Klocwork for C/C++,
Klocwork for Java, Klocwork Extensibility Interface, and Klocwork Stack Overflow Analyzer are trademarks of Klocwork Inc.
Copyright notices for third-party software are contained in the file “3rdparty_copyright_notices.txt”, located in the Klocwork installation
directory.
Adobe®, Adobe Acrobat, Acrobat Exchange, Acrobat Reader, and PostScript are either registered trademarks or trademarks of Adobe Systems
Incorporated in the United States and/or other countries. Rational ClearCase is a registered trademark of IBM Corporation. Linux is a registered
trademark of Linus Torvalds. FLEXlm is a registered trademark of Macrovision Corporation. Microsoft®, Microsoft Word, Microsoft Excel,
Microsoft Office, Internet Explorer, Windows®, Windows NT®, Windows® 2000, Windows® 2000 Server, Windows® Server 2003, Windows®
XP, MS-DOS™, Microsoft Visual Studio®, Microsoft .NET, and Microsoft Visual C++ are trademarks of Microsoft Corporation. Pentium® is a
registered trademark of Intel Corporation. Red Hat is a trademark of Red Hat, Inc., in the United States and other countries. Sun, Sun
Microsystems, the Sun Logo, Solaris, Forte, Java, JRE and all Java-related trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks or registered
trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an
architecture developed by Sun Microsystems, Inc. MySQL is a registered trademark of MySQL AB in the USA and other countries. InstallShield
is a service mark and is either a registered trademark or trademark of InstallShield Software Corporation in the United States and/or other
countries. IntelliJ IDEA is either a trademark or a registered trademark of JetBrains, Inc. Java Service Wrapper is a trademark of Tanuki Software.
WinCVS, Krusader and SourceForge are trademarks of OSTG Open Source Technology Group, All Rights Reserved. Apache TomCat is a
trademark of the Apache Software Foundation. Green Hills is a registered trademark of Green Hills Software, Inc. Metrowerks is a registered
trademark of Freescale Semiconductor, Inc. Wind River is a registered trademark of Wind River Systems, Inc. yEd is a trademark of yWorks
GmbH. JBuilder is a registered trademark of Borland Software Corporation. BEA WebLogic is a registered trademark of BEA Systems, Inc.
Klocwork Inc.
Toll-free telephone (North America):
1-866-556-2967
E-mail:
sales@klocwork.com
support@klocwork.com
Web site: http://www.klocwork.com
In the U.S.:
8 New England Executive Park, Suite 180
Burlington, Massachusetts 01803 USA
In Canada:
30 Edgewater Street, Suite 114
Ottawa, Ontario
Canada K2L 1V8
iii
Contents
Chapter 1 Getting started 7
Who should read this book? .......................................................................................................................... 7
Documentation conventions ......................................................................................................................... 7
Help and support ........................................................................................................................................... 8
Chapter 2 Overview of integrating Klocwork with your builds 9
Overview of the integration process ............................................................................................................. 9
About build specifications ............................................................................................................................ 9
Chapter 3 Create a C/C++ build specification 11
Different methods for different kinds of projects ....................................................................................... 11
Projects based on make, nmake, or variants or on build scripts .................................................................. 12
Creating a build specification with kwinject ................................................................................... 12
Generating a build trace ................................................................................................................... 13
Making sure kwinject recognizes your compiler type ..................................................................... 14
Using kwwrap plus kwinject as an alternate method ....................................................................... 14
Environment variables used by kwinject ......................................................................................... 14
Microsoft Visual Studio projects ................................................................................................................ 15
Creating a build specification for Microsoft Visual Studio projects................................................ 16
Creating a build specification for devenv, msdev or vcbuild .......................................................... 20
Analyzing projects with precompiled headers ................................................................................. 21
Note on managed C++ code ............................................................................................................ 22
Chapter 4 Create a Java build specification 23
Overview of creating Java build specifications .......................................................................................... 23
Creating a build specification with kwant ....................................................................................... 24
Manual integration -- editing the ant build file ................................................................................ 24
Build specifications for projects that contain .jsp files ............................................................................... 25
Java projects that are not compiled with ant and have .jsp files ...................................................... 26
Chapter 5 Creating and using a build specification template 27
About build specification templates ............................................................................................................ 27
The kwpsroot variable ..................................................................................................................... 28
Creating a build specification template for C/C++ projects ........................................................................ 29
Creating a build specification template for Java projects ........................................................................... 29
Using the build specification template ........................................................................................................ 30
Using a build specification template with kwcheck ........................................................................ 30
Using a build specification template with kwbuildproject .............................................................. 30
iv Contents
Example: Creating and using a build specification template ...................................................................... 31
Chapter 6 Run the Klocwork analysis 33
Introduction ................................................................................................................................................ 33
Run an analysis using the build specification ............................................................................................. 33
Create a Klocwork project .......................................................................................................................... 34
Load the analysis results into the Klocwork database ................................................................................ 35
If you are loading tables created during a previous analysis ........................................................... 36
Preventing source files from being copied to the projects_root .................................................................. 36
Reusing build specifications ....................................................................................................................... 37
How to analyze only changes since the last analysis .................................................................................. 38
Resuming an interrupted analysis ............................................................................................................... 38
Using customized configuration files for Klocwork analysis ..................................................................... 39
Chapter 7 Viewing and changing project and analysis properties 41
Viewing project properties with kwadmin .................................................................................................. 41
Project properties displayed in kwadmin ......................................................................................... 42
Viewing analysis properties with kwadmin ................................................................................................ 45
Analysis properties displayed in kwadmin ...................................................................................... 46
Analysis states ................................................................................................................................. 49
Changing project properties with kwadmin ................................................................................................ 49
Java language-level compatibility ............................................................................................................... 50
Chapter 8 Managing configuration files 53
Configuration files for Klocwork projects .................................................................................................. 53
Importing configuration files ...................................................................................................................... 53
Importing a file for all projects in a projects_root ........................................................................... 53
Importing a file into a specific project ............................................................................................. 54
Removing configuration files ..................................................................................................................... 54
Removing a file from your entire Klocwork installation ................................................................. 54
Removing a file from a specific project .......................................................................................... 55
Chapter 9 Integrating with a Source Code Management System 57
Introduction ................................................................................................................................................ 57
Ensure the prerequisites are met ................................................................................................................. 58
Create a retrieval script ............................................................................................................................... 58
Start a Klocwork analysis ........................................................................................................................... 60
Create a script to modify the map.dat file ................................................................................................... 60
Complete the Klocwork build ..................................................................................................................... 61
Example: Integrating with ClearCase ......................................................................................................... 61
Install the Klocwork add-on for ClearCase integration ................................................................... 61
Set up a ClearCase view for Klocwork ............................................................................................ 62
Edit two Klocwork configuration files ............................................................................................ 63
Run kwCCremap or add it to your build script ................................................................................ 65
Contents v
Appendix A Troubleshooting 67
Collecting troubleshooting information for Klocwork support ................................................................... 67
Where to find more troubleshooting information ....................................................................................... 68
Unable to generate build specification for Visual Studio 6.0 project ......................................................... 68
User Models not visible in Architect or Klocwork Review in a project created from tables ...................... 69
Analysis logs ............................................................................................................................................... 69
Brief analysis log ............................................................................................................................. 69
Full analysis log ............................................................................................................................... 69
Appendix B How kwinject works 71
Introduction ................................................................................................................................................ 71
Interception ................................................................................................................................................. 71
Filtering ...................................................................................................................................................... 72
How kwinject handles a command line from the native build .................................................................... 73
Making sure kwinject recognizes your compiler ........................................................................................ 74
The master filter configuration file .................................................................................................. 74
Compilers recognized by kwinject by default ................................................................................. 74
Overview of making kwinject recognize your compiler .................................................................. 76
Using a default compiler with a non-standard name ....................................................................... 76
Creating custom filter configuration files ........................................................................................ 77
Determining which build commands should be intercepted by Klocwork ...................................... 80
Appendix C Using kwwrap plus kwinject to generate a build specification 83
About kwwrap ............................................................................................................................................ 83
Editing the makefile .................................................................................................................................... 83
Example ........................................................................................................................................... 85
If you cannot substitute your compiler with a command plus options ............................................ 85
When editing the makefile is not an option ................................................................................................ 86
Using environment variables ........................................................................................................... 86
Creating wrapper scripts .................................................................................................................. 87
You can run a "pretend" build as a test ....................................................................................................... 88
Appendix D Generating a build specification from a distributed build log 89
Generating a build specification from an Electric Cloud distributed build log ........................................... 89
Appendix E Klocwork file formats 91
Special characters in the build specification and build trace ...................................................................... 91
Build specification file format .................................................................................................................... 92
Format of the build specification file for C/C++ projects ................................................................ 92
Format of the build specification file for Java projects ................................................................... 94
剩余105页未读,继续阅读
资源评论
stephegn
- 粉丝: 9
- 资源: 39
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 毕业设计代码+文章:毕业设计 网上购物 文章+代码 毕业设计 网上购物 文章+代码
- fortran教程:Fortran 语言教程,详细地介绍了Fortran语言
- 集监控点监控、日志监控、数据可视化及监控告警为一体的分布式开源监控系统 支持插件功能, 监控插件无需开发,支持多种告警方式
- java代码:java工具类-javaUtils多种工具类-正则工具-base64工具等
- 简单详细介绍了python爬虫基础.docx
- 详细介绍啦智能车图像处理去畸变教程.docx
- fortran代码:数值算法-人工智能算法-完整代码
- centos7中java8+mysql80+hadoop3.2.4集群+hive3.1.2从0开始搭建(仅供参考)
- 非常详细描述了大创项目进行流程.docx
- matlab代码:红尾鹰优化算法 Red‑tailed hawk algorithm RTH算法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功