From bde5ee533f1f0743af9deab8d6bc55710a2d907b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Sat, 14 Oct 2023 14:21:04 +0200 Subject: [PATCH] Enable duplicate checker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon Kłos Change-Id: If08ceb5dd6ca83b6c1bd5e8bd1d8028a61f4296f --- browser/Makefile.am | 18 +++++++++--------- browser/package.json | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/browser/Makefile.am b/browser/Makefile.am index 18c9ec90b0c5..5ee34f702c43 100644 --- a/browser/Makefile.am +++ b/browser/Makefile.am @@ -825,15 +825,15 @@ check-local: $(MOCHA_TS_JS_FILES) cat ${MOCHA_TEST_LOG}; \ exit 1; \ fi -# TODO: enable duplication checker. It also needs to be added into packages. -# @echo "Checking code duplication..." -# @echo > ${DUPLICATION_TEST_LOG} -# @if npm run duplication 2> ${DUPLICATION_TEST_LOG} 1>&2; then \ -# echo "Code duplication tests finished successfully."; \ -# else \ -# cat ${DUPLICATION_TEST_LOG}; \ -# exit 1; \ -# fi + + @echo "Checking code duplication..." + @echo > ${DUPLICATION_TEST_LOG} + @if npm run duplication 2> ${DUPLICATION_TEST_LOG} 1>&2; then \ + echo "Code duplication tests finished successfully."; \ + else \ + cat ${DUPLICATION_TEST_LOG}; \ + exit 1; \ + fi # the delay (in milliseconds) between each emulated key stroke for each view typing_speed=100 diff --git a/browser/package.json b/browser/package.json index 8b17c344d249..4e8018a504cf 100644 --- a/browser/package.json +++ b/browser/package.json @@ -16,6 +16,7 @@ "eslint": "7.0.0", "fzstd": "0.1.0", "hammerjs": "2.0.8", + "jscpd": "3.5.10", "jquery": "3.5.1", "jquery-contextmenu": "2.9.2", "jquery-mousewheel": "3.1.13",