A Cryptocurrency code quality analyzer
To run, the following dependencies are needed:
Lizard
pip install lizardCPPCheck
sudo apt-get install cppcheckLCOV
sudo apt-get install lcovcmake
sudo apt-get install cmakeThe following dependencies are used by some or all of the cryptocurrencies:
sudo apt-get install autoconf \
automake \
autotools-dev \
bsdmainutils \
build-essential \
curl \
doxygen \
graphviz \
g++-multilib \
libboost-all-dev \
libboost-chrono-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libcurl4-openssl-dev \
libc6-dev \
libdb++-dev \
libevent-dev \
libgtest-dev \
libleveldb-dev \
libminiupnpc-dev \
libreadline-dev \
libsodium-dev \
libssl-dev \
libtool \
libunbound-dev \
libunwind8-dev \
libzmq3-dev
miniupnpc \
m4 \
ncurses-dev \
pkg-config \
python-zmq \
python3 \
unzip \
wget \
zlib1g-devOnce all dependencies have been installed, the report can be generated by entering the command:
./genhtml.pyTo add a new cryptocurrency, ensure the following conventions are followed:
- The script to build the crypto can be called from the command line via <cryptoname>.sh
- The results of lizard for the uncompiled code are stored in a file <cryptoname>lizarduncomp.txt
- The results of lizard for the compiled code are stored in a file <cryptoname>lizard.txt
- A file <cryptoname>url.txt is present in the crypto's directory and contains the url for the crypto's github page on a single line
- The time it takes for the script to run is stored in a file <cryptoname>time.txt and only contains the time it takes the script to run in milliseconds
- The results of CPP-Check are stored in a file <cryptoname>cppcheck.txt and contain both errors and warnings
- The results of the lcov report are stored in a directory named 'lcov' and this directory is in the same directory as <cryptoname>.sh
If all these conventions are followed, you can simply two lines to genhtml.py:
- runscript("<cryptoname>")
- generate("<cryptoname>")
Now, when genhtml.py is run, it will automatically build the cryptocurrency and add the results to the report.html file