Главная | Actual Topics | Обратная связь | В избранное | Сделать домашней | Антиспам ;)
 System & Utilities
 Unix News
 OS Emulator
Каталог статей
Все статьи

Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом

October, 2018
Какой из этих ОС Вы отдаете большее предпочтение?

Mac OS
Windows XP
Windows 2003
Что такое ОС? :)

Другие опросы

Всего голосов: 327
Комментарии: 0

Архив Новостей
 October 2018 (7)
 September 2018 (8)
 August 2018 (8)
 July 2018 (11)
 June 2018 (13)
 May 2018 (10)
 April 2018 (14)
 March 2018 (11)
 February 2018 (13)
 January 2018 (13)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (473)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

KDevelop with Cppcheck Integration

System & Utilities

KDevelop with Cppcheck Integration

Starting with 5.1 release KDevelop supports built-in integration with static-analysis tool Cppcheck. Cppcheck provides unique code analysis to detect bugs and focuses on detecting undefined behaviour and dangerous coding constructs. The goal is to detect only real errors in the code (i.e. have very few false positives). Such analysis is very useful for all projects, especially for projects with complex structure and large code volume. Convenient integration with the development environment greatly simplifies and speeds up the process of code checking, as there is no need to study the analyzer documentation, its manual configuration and code navigation when processing the analysis results.

To use cppcheck integration in KDevelop, you only need to:

  1. Install cppcheck with using standard tools of your operating system.
  2. Select the required check parameters in the project properties.
  3. Run the check and analyze the code for found (potential) errors.

Let's take a closer look at the process of setting up and running the analyzer (we suppose that cppcheck is already installed).

Configure cppcheck in KDevelop (optional)

First, you must verify that the path to the cppcheck executable is correct. The path should be automatically detected but if you install cppcheck to non-standard place or if you want to use non-system version such path must be setup through plugin configuration page: "Settings" -> "Configure KDevelop" -> "Analyzers" -> "Cppcheck":

Cppcheck plugin config page

By default "native" cppcheck's output it not shown during the check and also we hide it's XML output. This can be enabled with appropriate checkbox and output can be viewed manually in the standard "Test" tool view:

If cppcheck executable path is ok we can set up check parameters for the individual projects through project's configuration page.

Configure check parameters for the individual projects (optional)

"Project" -> "Open Configuration" -> "Cppcheck":

Project's configuration page

The config page contains tabbar to control cppcheck behavior and auto-updated command line panel which displays the resulting cppcheck command line. First tab allows you enable/disable different types of analysis. Full description can be found in the cppcheck documentation and short version is displayed as tooltip for the selected checkbox.

Second page allows you setup include directories where cppcheck will try to find headers during analysis. By default we enable only "project" includes but you also enable "system" directories (like /usr/include/). Note that enabling system directories can slowdown the analysis. You also can block some include directories if necessary:

Include directories configuration

Last tab allows you to pass custom extra parameters to the cppcheck. This may be useful since built-in GUI controls supports only commonly-used functionality. See cppcheck documentation for all supported parameters:

Extra parameters settings

When all configuration steps are finished press "OK"/"Apply" to save your changes. Next we are ready to start code analysis.

Starting the cppcheck code analysis

This can be done with 3 ways:

  1. From the main menu: "Code" -> "Analyze Current File/Project With".
  2. From the editor context menu: "Analyze Current File/Project With".
  3. From the "Projects" tool view context menu. You should select some element in the tree and call context menu: "Analyze With" -> "Cppcheck". Depending on the selection the check will be start for whole project, some directory or for the single file.

When the analysis is started the standard "Problems" tool view is activated and opens "Cppcheck" tab. All problems will be placed into the table and can be activated with mouse-click on appropriate line. When some problem is activated the corresponding source file will be open in the editor and cursor will be placed on error's line:

Cppcheck errors view


You should analyze the problem's code and fix it if necessary. Note that some errors are not errors but only cppcheck recommendations. Some errors can be false-positive cppcheck triggers therefore no fixes needed. Also some error lines displays information not associated with source code - when, for example, cppcheck can't find include paths for some headers. Note that cppcheck tool is not ideal and you should carefully analyze each error line in the report and decide to fix or ignore it.

After fixing the errors found by cppcheck the analysis can be restarted. This can be do as described earlier or by "one-click" on first button in the "Cppcheck" problems view ("Re-Run Last Cppcheck Analysis").

Presented cppcheck integration plugin provides simple and easy-to-use mechanism for checking your code for some common errors. Regular using of such analysis tool can help you to catch and fix many errors before they happens in the released version of your software.

htower Mon, 2018/03/05 - 18:00


Разместил: Planet KDE | Дата: 05.03.2018 | Прочитано: 199 | Раздел: System & Utilities   

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Хорошо Нормально Пойдёт Плохо

Смотрите также связанные темы

28.10.2015 Plasma 5 Powers KaOS Productivity
The KaOS Linux distro is a very efficient Linux distribution built around a refined KDE desktop environment that just keeps getting better. The KDE integration is much more controlled than you will find in other Linux choices.
"New platform offers unified management of all acoustics in the car, enabling customers to reduce the cost, complexity, and time-to-production of audio signal-processing systems. Las Vegas, International CES 2016, LVCC North Hall, Booth 325 - January 6 - QNX Software Systems Limited, a subsidiary of BlackBerry Limited, today announced the new QNXreg; Acoustics Management Platform AMP, a comprehensive solution that allows automakers to enhance the audio and acoustic experience for drivers and passengers, while reducing system costs and complexity.Modern vehicles contain multiple acoustic and au...
13.05.2008 VMware Stage Manager Gets Applications Into Production Faster and More Reliably
VMware Stage Manager Now Available to Accelerate Application Release and Deployment Management. PALO ALTO, Calif., May 12, 2008 — VMware, Inc. (NYSE: VMW), the global leader in virtualization solutions from the desktop to the datacenter, today announced that VMware Stage Manager, a breakthrough product for accelerating and automating the delivery of applications from staging to production, is now available for order. Joining VMware’s suite of management and automation products for the datacenter, VMware Stage Manager automates the process of transitioning application environments in the virtua...
28.02.2008 www/tomcat-native - 1.1.13
Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets). These features allows making Tomcat a general purposewebserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver plat...
30.03.2008 Экспериментальные проекты Мозиллы и будущее Лисы
В Мозилле разрабатываются два экспериментальных проекта: Weave, инфраструктура для создания online-сервисов. Исходя из этого, уже ведутся Источник
31.03.2008 devel/mercurial - 1.0
Upgrade to the long-awaited Mercurial 1.0 release! General: * greatly improved merge tool configuration, see "hgrc.5.txt" for details * improved copy/rename handling in diffs, status, and merge * files in .hg inherit permissions from .hg/store * infer --repository when possible, so commands may be run from anywhere. * easy-installable * new "droplet" logo Extensions: * churn: promoted to an official extension (previously in contrib) * color: new extension coloring "status" and "qseries" command outputs * convert: - allow synthetic history to be spliced...
26.05.2008 Marble integration with KOffice
Submitted by torsten rahn on Sat, 05/24/2008 - 21:01. KDE General Shortly after the Marble OpenStreetMap integration I'm happy to report that Simon Schmeisser has managed to integrate Marble as a Flake Shape ...
08.07.2008 I'm going to.....
Submitted by frederik gladhorn on Mon, 07/07/2008 - 22:20. KDE General I took a sneak peek at Kdevelop.
16.07.2008 RE: install kde
Nokia's done some really nice integration stuff with the maemo API and the limited set of buttons the 770 has, so KDE would have to be modified to support that.
07.10.2008 SAP application-aware management integration: a model for the future?
At VMworld, we talked about how we think you'll be managing your VMware Infrastructure in the future. Through programs like the VMware Ready Management Initiative and the APIs and services on the platform, the management vendors you're already using will...
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search


Топ Новостей
1: Fedora and KDE/spin\'s treatment - Discussion
Просмотров - 2657

2: Offline Vaults for an extra layer of protection
Просмотров - 705

3: KDE\'s Kirigami 2.0 Framework for Convergent UIs Enters Beta with New Features
Просмотров - 694

4: Akonadi/KMail issues on Tumbleweed?
Просмотров - 655

5: Netrunner Desktop 16.09 "Avalon" Linux OS Is Out with Kernel 4.7, KDE Plasma 5.7
Просмотров - 634

6: KDevelop 5.0.2 released for Windows and Linux
Просмотров - 619

7: Debugging issues booting a PC in 2018
Просмотров - 578

8: plib3.gui 0.9.9
Просмотров - 553

9: Multi-screen woes in Plasma 5.7
Просмотров - 550

10: Konstruct
Просмотров - 546

11: Embrace Open Source culture: the 5 common transformations.
Просмотров - 536

12: GSoC Update 1: The Beginning
Просмотров - 531

13: Come dine with the KDE e.V. board in Berlin in October
Просмотров - 525

14: KDE Connect – State of the union
Просмотров - 524

15: KDE Connect Sprint
Просмотров - 521

Google 120X240

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 2.898 сек. и 13 запросов к базе данных за 2.852 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.