<commit_before># Generated Makefile for libsolace: Friday 7 October  13:25:50 AEDT 2016
PREFIX = /usr
dbg = -g


PROJECT = solace

# Project directory layout
BUILD_DIR = build
ANALYZE_DIR = build-analyze
INCLUDE_DIR = include
SRC_DIR = libsolace
TEST_DIR = test


MODULE_HEADERS = ${INCLUDE_DIR}/*
MODULE_SRC = ${SRC_DIR}/*

GENERATED_MAKE = ${BUILD_DIR}/Makefile

LIBNAME = lib$(PROJECT).a
LIB_TAGRET = $(BUILD_DIR)/$(SRC_DIR)/$(LIBNAME)

TESTNAME = test_$(PROJECT)
TEST_TAGRET = $(BUILD_DIR)/$(TEST_DIR)/$(TESTNAME)

DOC_DIR = doc
DOC_TARGET = $(DOC_DIR)/html

COVERAGE_REPORT = coverage.json

# First tagret that starts not with '.'' - is a default target to run
.PHONY: codecheck verify ANALYZE_MAKE

all: lib


#-------------------------------------------------------------------------------
# CMake wrapper
#-------------------------------------------------------------------------------
$(BUILD_DIR):
	mkdir -p $(BUILD_DIR)

$(GENERATED_MAKE): ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake ..

release: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=Release ..
	$(MAKE) -C ${BUILD_DIR}

debug: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=Debug ..
	$(MAKE) -C ${BUILD_DIR}


#-------------------------------------------------------------------------------
# Build the project
#-------------------------------------------------------------------------------
$(LIB_TAGRET): $(GENERATED_MAKE)
	$(MAKE) -C ${BUILD_DIR} $(PROJECT)

lib: $(LIB_TAGRET)

#-------------------------------------------------------------------------------
# Build unit tests
#-------------------------------------------------------------------------------
$(TEST_TAGRET): ${GENERATED_MAKE}
	$(MAKE) -C ${BUILD_DIR} $(TESTNAME)

test: $(LIB_TAGRET) $(TEST_TAGRET)
	cd ${BUILD_DIR} && ./${TEST_DIR}/$(TESTNAME)

#-------------------------------------------------------------------------------
# Build docxygen documentation
#-------------------------------------------------------------------------------
$(DOC_TARGET):
	doxygen doc/Doxyfile

# Build project doxygen docs doxyfile.inc 
doc: $(MODULE_HEADERS) $(MODULE_SRC) $(DOC_TARGET)


#-------------------------------------------------------------------------------
# Code quality assurance
#-------------------------------------------------------------------------------
$(ANALYZE_DIR):
	mkdir -p ${ANALYZE_DIR}

ANALYZE_MAKE: ${ANALYZE_DIR}
	cd ${ANALYZE_DIR} && cmake -DCMAKE_C_COMPILER=$(shell which scan-build) ..

libs/cppcheck:
	#./libs/dependencies
	git clone --depth 3 https://github.com/danmar/cppcheck.git libs/cppcheck

libs/FlintPlusPlus:
	git clone --depth 3 https://github.com/L2Program/FlintPlusPlus.git libs/FlintPlusPlus

libs/cppcheck/cppcheck: libs/cppcheck
	$(MAKE) -j2 -C libs/cppcheck cppcheck

libs/FlintPlusPlus/flint/flint++: libs/FlintPlusPlus
	$(MAKE) -j2 -C libs/FlintPlusPlus/flint

cpplint: $(MODULE_HEADERS) $(MODULE_SRC)
	cpplint --recursive --exclude=${TEST_DIR}/ci/* ${INCLUDE_DIR} ${SRC_DIR} ${TEST_DIR}

# TODO: Extra cppcheck options to consider: --enable=style --inconclusive
cppcheck: $(MODULE_HEADERS) $(MODULE_SRC) libs/cppcheck/cppcheck
	libs/cppcheck/cppcheck --std=c++11 --std=posix -D __linux__ --inline-suppr -q --error-exitcode=2 \
	--enable=warning,performance,portability,missingInclude,information,unusedFunction \
	-I include -i test/ci ${SRC_DIR} ${TEST_DIR} examples

flint: $(MODULE_HEADERS) $(MODULE_SRC) libs/FlintPlusPlus/flint/flint++
	libs/FlintPlusPlus/flint/flint++ -v -r ${SRC_DIR} ${TEST_DIR} examples/

scan-build: ANALYZE_MAKE
	cd $(ANALYZE_DIR) && scan-build $(MAKE)

tidy:
	clang-tidy -checks=llvm-*,modernize-*,clang-analyzer-*,-modernize-pass-by-value -header-filter=.* \
	${SRC_DIR}/*.cpp -- -I${INCLUDE_DIR} -Ilibs/fmt/ -std=c++14



codecheck: cpplint flint cppcheck #scan-build



#-------------------------------------------------------------------------------
# Runtime Quality Control
#-------------------------------------------------------------------------------

verify: $(TEST_TAGRET)
	# > 3.10 (not avaliable on trusty) --expensive-definedness-checks=yes
	valgrind --trace-children=yes --track-fds=yes --read-var-info=no --redzone-size=128 --error-exitcode=4 \
	--tool=exp-sgcheck $(TEST_TAGRET) && \

	valgrind --trace-children=yes --track-fds=yes --read-var-info=no --redzone-size=128 --error-exitcode=3 \
	--tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --partial-loads-ok=no \
	$(TEST_TAGRET)

$(COVERAGE_REPORT):
	coveralls --exclude build --exclude libs --exclude tests --gcov-options '\-lp' --dump $(COVERAGE_REPORT)

coverage: $(COVERAGE_REPORT)


#-------------------------------------------------------------------------------
# Insatall
#-------------------------------------------------------------------------------<commit_msg>Makefile verify typo fix<commit_after># Generated Makefile for libsolace: Friday 7 October  13:25:50 AEDT 2016
PREFIX = /usr
dbg = -g


PROJECT = solace

# Project directory layout
BUILD_DIR = build
ANALYZE_DIR = build-analyze
INCLUDE_DIR = include
SRC_DIR = libsolace
TEST_DIR = test


MODULE_HEADERS = ${INCLUDE_DIR}/*
MODULE_SRC = ${SRC_DIR}/*

GENERATED_MAKE = ${BUILD_DIR}/Makefile

LIBNAME = lib$(PROJECT).a
LIB_TAGRET = $(BUILD_DIR)/$(SRC_DIR)/$(LIBNAME)

TESTNAME = test_$(PROJECT)
TEST_TAGRET = $(BUILD_DIR)/$(TEST_DIR)/$(TESTNAME)

DOC_DIR = doc
DOC_TARGET = $(DOC_DIR)/html

COVERAGE_REPORT = coverage.json

# First tagret that starts not with '.'' - is a default target to run
.PHONY: codecheck verify ANALYZE_MAKE

all: lib


#-------------------------------------------------------------------------------
# CMake wrapper
#-------------------------------------------------------------------------------
$(BUILD_DIR):
	mkdir -p $(BUILD_DIR)

$(GENERATED_MAKE): ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake ..

release: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=Release ..
	$(MAKE) -C ${BUILD_DIR}

debug: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=Debug ..
	$(MAKE) -C ${BUILD_DIR}


#-------------------------------------------------------------------------------
# Build the project
#-------------------------------------------------------------------------------
$(LIB_TAGRET): $(GENERATED_MAKE)
	$(MAKE) -C ${BUILD_DIR} $(PROJECT)

lib: $(LIB_TAGRET)

#-------------------------------------------------------------------------------
# Build unit tests
#-------------------------------------------------------------------------------
$(TEST_TAGRET): ${GENERATED_MAKE}
	$(MAKE) -C ${BUILD_DIR} $(TESTNAME)

test: $(LIB_TAGRET) $(TEST_TAGRET)
	cd ${BUILD_DIR} && ./${TEST_DIR}/$(TESTNAME)

#-------------------------------------------------------------------------------
# Build docxygen documentation
#-------------------------------------------------------------------------------
$(DOC_TARGET):
	doxygen doc/Doxyfile

# Build project doxygen docs doxyfile.inc 
doc: $(MODULE_HEADERS) $(MODULE_SRC) $(DOC_TARGET)


#-------------------------------------------------------------------------------
# Code quality assurance
#-------------------------------------------------------------------------------
$(ANALYZE_DIR):
	mkdir -p ${ANALYZE_DIR}

ANALYZE_MAKE: ${ANALYZE_DIR}
	cd ${ANALYZE_DIR} && cmake -DCMAKE_C_COMPILER=$(shell which scan-build) ..

libs/cppcheck:
	#./libs/dependencies
	git clone --depth 3 https://github.com/danmar/cppcheck.git libs/cppcheck

libs/FlintPlusPlus:
	git clone --depth 3 https://github.com/L2Program/FlintPlusPlus.git libs/FlintPlusPlus

libs/cppcheck/cppcheck: libs/cppcheck
	$(MAKE) -j2 -C libs/cppcheck cppcheck

libs/FlintPlusPlus/flint/flint++: libs/FlintPlusPlus
	$(MAKE) -j2 -C libs/FlintPlusPlus/flint

cpplint: $(MODULE_HEADERS) $(MODULE_SRC)
	cpplint --recursive --exclude=${TEST_DIR}/ci/* ${INCLUDE_DIR} ${SRC_DIR} ${TEST_DIR}

# TODO: Extra cppcheck options to consider: --enable=style --inconclusive
cppcheck: $(MODULE_HEADERS) $(MODULE_SRC) libs/cppcheck/cppcheck
	libs/cppcheck/cppcheck --std=c++11 --std=posix -D __linux__ --inline-suppr -q --error-exitcode=2 \
	--enable=warning,performance,portability,missingInclude,information,unusedFunction \
	-I include -i test/ci ${SRC_DIR} ${TEST_DIR} examples

flint: $(MODULE_HEADERS) $(MODULE_SRC) libs/FlintPlusPlus/flint/flint++
	libs/FlintPlusPlus/flint/flint++ -v -r ${SRC_DIR} ${TEST_DIR} examples/

scan-build: ANALYZE_MAKE
	cd $(ANALYZE_DIR) && scan-build $(MAKE)

tidy:
	clang-tidy -checks=llvm-*,modernize-*,clang-analyzer-*,-modernize-pass-by-value -header-filter=.* \
	${SRC_DIR}/*.cpp -- -I${INCLUDE_DIR} -Ilibs/fmt/ -std=c++14



codecheck: cpplint flint cppcheck #scan-build



#-------------------------------------------------------------------------------
# Runtime Quality Control
#-------------------------------------------------------------------------------

verify: $(TEST_TAGRET)
	# > 3.10 (not avaliable on trusty) --expensive-definedness-checks=yes
	valgrind --trace-children=yes --track-fds=yes --read-var-info=no --redzone-size=128 --error-exitcode=4 \
	--tool=exp-sgcheck $(TEST_TAGRET)

	valgrind --trace-children=yes --track-fds=yes --read-var-info=no --redzone-size=128 --error-exitcode=3 \
	--tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --partial-loads-ok=no \
	$(TEST_TAGRET)

$(COVERAGE_REPORT):
	coveralls --exclude build --exclude libs --exclude tests --gcov-options '\-lp' --dump $(COVERAGE_REPORT)

coverage: $(COVERAGE_REPORT)


#-------------------------------------------------------------------------------
# Insatall
#-------------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.3562057476051645, 'fraction_numerical': 0.006663890045814244, 'mean_word_length': 1.7232775730082224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5635641', 'n_tokens_mistral': 3056, 'n_tokens_neox': 2867, 'n_words': 589}