Skip to content

Commit 4fc76d8

Browse files
committed
CCM-8881: Exclude sonar coverage checks for scripts directory
1 parent b5477b3 commit 4fc76d8

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

scripts/config/sonar-scanner.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ sonar.sources=.
77

88
#sonar.python.coverage.reportPaths=.coverage/coverage.xml
99
#sonar.[javascript|typescript].lcov.reportPaths=.coverage/lcov.info
10+
sonar.coverage.exclusions=scripts

scripts/githooks/sync-template-repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ while IFS= read -r -d '' file || [[ -n $file ]]; do
111111
if is_merge "$relative_path"; then
112112
echo "Merging changes from $relative_path"
113113
cp "$target_path" "${target_path}.bak"
114-
node "${scriptdir}/merge.js" "$target_path" "$file" > "${target_path}.merged"
114+
node "${scriptdir}/../maintenance/merge.js" "$target_path" "$file" > "${target_path}.merged"
115115
if ! cmp -s "${target_path}.merged" "${target_path}.bak"; then
116116
FILES_WITH_CHANGES+=("${relative_path}")
117117
mv "${target_path}.merged" "$target_path"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*******************************************************************************
2+
* Script to merge all added lines from source to target.
3+
* Modified lines will be left intact.
4+
*
5+
* This is intended for updating config files like .tool-versions and .gitignore
6+
* where the first token on the line remains the same
7+
*
8+
* Usage:
9+
* $ node merge.js <target> <source>
10+
*
11+
* Output:
12+
* Outputs the merged file to stdout
13+
*
14+
*******************************************************************************/
15+
116
const fs = require("fs");
217

318
// Read files

0 commit comments

Comments
 (0)