Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A C++ API usability checker I developed for my MSc. dissertation. An open access paper is available here:https://www.mdpi.com/2079-9292/9/7/1077

License

NotificationsYou must be signed in to change notification settings

phitsc/check-cpp-api

Repository files navigation

Build Status

Try out check-cpp-api without building

check-cpp-api can be tried out on the libbitcoin libraries using thephitsc/check-libbitcoin-api Docker image. On any system with Docker installed, run the following command to start a Bash shell in a Docker container based on thephitsc/check-libbitcoin-api Docker image.

    docker run -it --rm phitsc/check-libbitcoin-api:1.3 /bin/bash

Then, within the Bash shell in the newly started Docker container, run:

    cd ~/libbitcoin-all    find . -name '*.hpp' -exec check-cpp-api -kc-1-1-case-type=snake {} +

Build instructions

Option 1: Build together with Clang on Linux

  1. Follow the build instructions onhttps://clang.llvm.org/get_started.html . Make sure to include step 4 'extra Clang tools'.

  2. Clone thecheck-cpp-api repository intollvm/tools/clang/tools/extra/.

  3. Addadd_subdirectory(check-cpp-api) at the bottom ofllvm/tools/clang/tools/extra/CMakeLists.txt

  4. Build everything as described in step 7 'Build LLVM and Clang' onhttps://clang.llvm.org/get_started.html .

Option 2: Build with Docker

  1. Clone thecheck-cpp-api repository into a directory of your choice and change into that directory.

     git clone --recursive https://github.com/phitsc/check-cpp-api.git cd check-cpp-api
  2. Create thelibtooling docker image for building Clang tools.

     sudo docker build -t libtooling api-utils-common/Docker
  3. Run the make script.

     ./make

Using check-cpp-api

Running check-cpp-api against the test project

  1. Change intocheck-cpp-api/test/integration_tests.

     cd test/integration_tests
  2. Create thebuilddir directory and change into it.

     mkdir builddir cd builddir
  3. Create the compilation database.

     cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..

    Make sure thecompile_commands.json file has been created in theintegration_tests/builddir directory.

  4. Change back into thecheck-cpp-api directory and runcheck-cpp-api.

     cd ../../.. ./check-cpp-api -p test/integration_tests/builddir test/integration_tests/src/main.cpp

    Note thatcheck-cpp-api must be executed on the same host platform on which the compilation database was created or the script will not be able to map the source file paths from the host filesystem to to container filesystem.

About

A C++ API usability checker I developed for my MSc. dissertation. An open access paper is available here:https://www.mdpi.com/2079-9292/9/7/1077

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp