Skip to content

A code-understanding, code-browsing or code-search tool. This is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code. It builds upon the databases of cscope and ctags, and provides a nice GUI tool.

License

Notifications You must be signed in to change notification settings

skytechie/codequery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeQuery

This is a tool to index, then query or search C, C++ and Java source code (and probably also C#).

It builds upon the databases of cscope and Exuberant ctags.

The databases of cscope and ctags would be processed by the cqmakedb tool to generate the CodeQuery database file.

The CodeQuery database file can be viewed and queried using the codequery GUI tool.

Latest version = v0.02

For Windows, v0.02 available here for download: CodeQuery@sourceforge downloads

For Linux, please read the INSTALL-LINUX file. The latest git version (HEAD on master branch) can be used.

Please read NEWS to find out more.

How is it different from cscope and ctags? What are the advantages?

Both cscope and ctags can do symbol lookup and identify functions, macros, classes and structs.

cscope is very C-centric, but is fuzzy enough to cover C++ and Java, but not very well for e.g. it doesn't understand destructors and class member instantiations. It can't provide relationships of class inheritance and membership. cscope can do "functions that call this function" and "functions called by this function". This is a very powerful feature that makes cscope stand out among comparable tools.

ctags does many languages well and understands destructors, member instantiations, and the relationships of class membership and inheritance. From ctags, we can find out "members and methods of this class", "class which owns this member or method", "parent of this class", "child of this class" etc. However, it doesn't do "functions that call this function" or "functions called by this function".

So both these tools have their pros and cons, but complement each other.

CodeQuery is a project that attempts to combine the features available from both cscope and ctags, provide faster database access compared to cscope (because it uses sqlite) and provides a nice GUI tool as well.

  • Combines the best of both cscope and ctags
  • Faster due to the use of sqlite for the CodeQuery database
  • Cross-platform GUI tool
  • Auto-complete feature
  • case-insensitive, partial keyword search, or exact match search
  • File viewer with syntax highlighting
  • Ability to open viewed file in an external editor or IDE.

What types of query can I make?

  • Symbol
  • Function or macro
  • Class or struct
  • Functions calling this function
  • Functions called by this function
  • Class which owns this member or method
  • Members and methods of this class
  • Parent of this class (inheritance)
  • Children of this class (inheritance)
  • Files including this file
  • Full path for file

What does it cost? How is it licensed?

It's freeware and free open source software.

It's licensed under the GNU GPL v3. See LICENSE.md or LICENSE.txt.

Can I use it in a commercial environment without purchasing, for an unlimited time?

Yes. However, donations are welcomed.

Which platforms are supported?

It has been tested on Ubuntu 32-bit, Windows XP and Windows 7.

Contributions are welcomed to attempt ports to Mac OS and other operating systems.

Is the software available in multiple languages?

Yes. This applies only to the GUI tool.

Contributions are welcomed to update or provide new translations.

How to install it?

On Windows, EXE setup packages will be provided here: CodeQuery@sourceforge downloads. The EXE setup package shall also contain cscope.exe, ctags.exe and the required DLLs. So, everything you need is in one package.

On Linux, please read the INSTALL-LINUX file.

How do I use it?

Please read the HOWTO file provided for each platform. The workflow looks like this: CodeQuery workflow

On Linux: HOWTO-LINUX

On Windows: HOWTO-WINDOWS

How do I contact the authors for support, issues, bug reports, fix patches etc.?

Please see the email address below, and also the Issues tab in GitHub.

Email address: Contact address

Website: CodeQuery website

List of Contributors

ruben2020
(More welcomed)

What does it look like?

CodeQuery screenshot

About

A code-understanding, code-browsing or code-search tool. This is a tool to index, then query or search C, C++, Java, Python, Ruby, Go and Javascript source code. It builds upon the databases of cscope and ctags, and provides a nice GUI tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 89.3%
  • Makefile 3.9%
  • Python 3.1%
  • C 2.6%
  • CMake 0.5%
  • Perl 0.3%
  • Other 0.3%