Leon Anavi
IT Tips && Tricks

C/C++

Created: 24.03.2010 00:44 Last Modified: 24.03.2010 09:51 Views: 8380
Keywords: analysis, CQL

Code Analysis

Code Analysis

Code analysis and reviews are very important for keeping the source nice and tidy. Static code analysis is a method for testing a software product without running it. Various tools are available for optimization of the code analysis.

Code Query Language

The purpose of CQL is to perform queries over the source code and to retrieve statistics. The syntax is similar to SQL (Structured Query Language) and it is not a coincidence CQL regards the source as a database. Over 200 keywords are available to execute different queries and retrieve data. Using CppDepend and CQL developers can analyses their C/C++ code and prepare useful graphs.

CQL Example

WARN IF Count > 0 IN SELECT METHODS WHERE NbLinesOfCode > 200 ORDER BY NbLinesOfCode DESC
This query retrieves all long methods that should be split.

External Links

Code Query Language 1.8 Specification


  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.