dextool 1.2.0

C/C++ tooling for testing and visualisation


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

dextool Build Status codecov

deXtool is a framework for writing plugins using libclang. The main focus is tools for testing and analyze.

The plugins in a standard installation of deXtool are:

  • Analyze. Analyze C/C++ code to generate complexity numbers such as McCabe.
  • C TestDouble. Analyze C code to generate a test double implementation.
  • C++ TestDouble. Analyze C++ code to generate a test double implementation.
  • Compilation Database. Tool for manipulating db(s) such as merge, compiler flag filtering, relative->absolute path. Usually called compile_commands.json.
  • Mutate. Mutation testing tool for C/C++.
  • GraphML. Analyze C/C++ code to generate a GraphML representation. Call chains, type usage, classes as groups of methods and members.
  • Intercept. Analyze a C header together with a config to generate interceptor functions.
  • UML. Analyze C/C++ code to generate PlantUML diagrams.

Plugin Status

"C TestDouble", production ready. The API of the generated code and how it behaves is stable.

"C++ TestDouble" is nearing production quality.

"Mutate" is in alpha phase. Further info

Getting Started

deXtool depends on the following software packages:

deXtool has been tested with libclang [4.0, 5.0].

For people running Ubuntu two of the dependencies can be installed via apt-get. The version of clang and llvm depend on your ubuntu version.

sudo apt install cmake llvm-4.0 llvm-4.0-dev clang-4.0 libclang-4.0-dev libsqlite3-dev

Download the D compiler of your choice, extract it and add to your PATH shell variable.

# example with an extracted DMD
export PATH=/path/to/dmd/linux/bin64/:$PATH

Once the dependencies are installed it is time to download the source code and build the binaries.

git clone https://github.com/joakim-brannstrom/dextool.git
cd dextool
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/where/to/install/dextool/binaries ..
make install -j2

Done! Have fun. Don't be shy to report any issue that you find.

Credit

Jacob Carlborg for his excellent DStep. It was used as a huge inspiration for this code base. Without DStep deXTool wouldn't exist.

Authors:
  • Joakim Brännström
Dependencies:
none
System dependencies:
libclang.so.1 3.6+
Versions:
5.0.0 2022-Dec-09
4.3.0 2022-Jun-03
4.2.0 2022-Mar-24
4.1.0 2022-Feb-08
4.0.0 2021-Sep-08
Show all 51 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 401 downloads total

Score:
2.2
Short URL:
dextool.dub.pm