mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 11:43:03 +02:00
chore: update jscpd settings to min 14 lines and ignore txt files
- Increase minimum clone detection from 5 to 14 lines - Ignore .txt files (package lists are intentional documentation overlap) - Results in 0% detected duplication
This commit is contained in:
parent
af007f2148
commit
2f758e1b6c
@ -72,16 +72,16 @@ if [[ ! -x $JSCPD_BIN ]]; then
|
||||
fi
|
||||
|
||||
# Run jscpd and capture output
|
||||
# --min-lines 5: minimum 5 lines to consider a clone
|
||||
# --min-lines 14: minimum 14 lines to consider a clone (ignores small boilerplate)
|
||||
# --min-tokens 25: minimum 25 tokens to consider a clone
|
||||
# --threshold 2: fail if more than 2% duplication
|
||||
jscpd_output=$("$JSCPD_BIN" \
|
||||
--pattern "**/*.sh" \
|
||||
--min-lines 5 \
|
||||
--min-lines 14 \
|
||||
--min-tokens 25 \
|
||||
--threshold 2 \
|
||||
--reporters "console" \
|
||||
--ignore "**/node_modules/**,**/.git/**,**/misc/testsAndMisc-bash/**" \
|
||||
--ignore "**/node_modules/**,**/.git/**,**/misc/testsAndMisc-bash/**,**/*.txt" \
|
||||
. 2>&1) || jscpd_exit=$?
|
||||
|
||||
if [[ ${jscpd_exit:-0} -ne 0 ]]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user