<commit_before>#!/bin/bash

errexit()
{
    echo Error: $1
    exit 1
}


function tools()
{
  g++ --version || errexit "g++ program is missing"
  gcov --version || errexit "gcov program is missing"
  valgrind --version  || errexit "valgrind program is missing"
  doxygen --version  || errexit "doxygen program is missing"
  dot -V  "dot program is missing"
  lscpu
  gcovr --version || errexit "gcovr program is missing"
}

function executecode()
{
  detectors=$(find . -name "*.so" | sed -e 's/\.so//')
  for detector in $detectors
  do
    echo "Starting detector "$detector
    ./prototype2/efu -d $detector -s 5 || errexit "detector plugin failed"
  done
}

rm -fr build
mkdir build

tools
cloc --by-file --xml --out=cloc.xml .
pushd build
conan install --build=outdated ..
source activate_build.sh
cmake -DCOV=y ..        || errexit "cmake failed"
make -j 5               || errexit "make failed"
make -j 5 runtest       || errexit "make runtest failed"
#executecode
make coverage           || errexit "make coverage failed"
make valgrind<commit_msg>added some errexit calls for conan<commit_after>#!/bin/bash

errexit()
{
    echo Error: $1
    exit 1
}


function tools()
{
  g++ --version || errexit "g++ program is missing"
  gcov --version || errexit "gcov program is missing"
  valgrind --version  || errexit "valgrind program is missing"
  doxygen --version  || errexit "doxygen program is missing"
  dot -V  "dot program is missing"
  lscpu
  gcovr --version || errexit "gcovr program is missing"
}

function executecode()
{
  detectors=$(find . -name "*.so" | sed -e 's/\.so//')
  for detector in $detectors
  do
    echo "Starting detector "$detector
    ./prototype2/efu -d $detector -s 5 || errexit "detector plugin failed"
  done
}

rm -fr build
mkdir build

tools
cloc --by-file --xml --out=cloc.xml .
pushd build
conan install --build=outdated .. || errexit "conan command failed"
source activate_build.sh          || errexit "conan activate_build failed"
cmake -DCOV=y ..                  || errexit "cmake failed"
make -j 5                         || errexit "make failed"
make -j 5 runtest                 || errexit "make runtest failed"
#executecode
make coverage                     || errexit "make coverage failed"
make valgrind
{'fraction_non_alphanumeric': 0.11962782454585734, 'fraction_numerical': 0.005316792202038104, 'mean_word_length': 2.6835236541598695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2325752', 'n_tokens_mistral': 750, 'n_tokens_neox': 751, 'n_words': 258}