Giter Club home page Giter Club logo

misracppdemo's Introduction

MisraCPP Project - Demo

Installation

git clone https://github.com/llvm-mirror/llvm.git -b release_70 --depth=1 llvm
git clone https://github.com/llvm-mirror/clang.git -b release_70 --depth=1 llvm/tools/clang
git clone https://github.com/nthu-pllab/MisraCPPDemo.git llvm/tools/clang/MisraCPP

echo "add_clang_subdirectory(MisraCPP)" >> llvm/tools/clang/CMakeLists.txt

cmake -S llvm -B build \
  -GNinja \
  -DLLVM_TARGETS_TO_BUILD=X86 \

cmake --build build

mkdir llvm/tools/clang/MisraCPP/tools/misra-scan/lib
mkdir llvm/tools/clang/MisraCPP/tools/misra-scan/bin
cp build/bin/clang build/bin/scan-build llvm/tools/clang/MisraCPP/tools/misra-scan/bin/
cp build/lib/MisracppChecker.so         llvm/tools/clang/MisraCPP/tools/misra-scan/lib/
cp -r build/lib/clang                   llvm/tools/clang/MisraCPP/tools/misra-scan/lib/

python3 -m venv MisraCpp-venv
source MisraCpp-venv/bin/activate
pip3 install -r llvm/tools/clang/MisraCPP/tools/misra-scan/requirements.txt

Running examples

cd llvm/tools/clang/MisraCPP/example

cd check-single-file
./misra-run.sh 14_8_2.cpp

cd ../check-project
bash check-libzmq.sh
cd report/{TIMESTAMP}
# open the index.html in browser
# or set up a http server, e.g. `python3 -m http.server 8000`
# then open {server-ip-address}:8000 on your host browser

misracppdemo's People

Contributors

yun-cloud avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.