Skip to content

Instantly share code, notes, and snippets.

@jmarshall
Created September 17, 2020 11:11
Show Gist options
  • Save jmarshall/f43df0ae871b6d9bd71b9c48e1517872 to your computer and use it in GitHub Desktop.
Save jmarshall/f43df0ae871b6d9bd71b9c48e1517872 to your computer and use it in GitHub Desktop.
Codespell wrapper script and filters for HTSlib et al
#!/bin/sh
skip=`(cat /dev/null $(find . -name 'wt-*' -prune -o -name .gitignore -print) | sed '/^$/d;s&^.*/&&'; printf '.DS_Store,*.dSYM
*.sam,*.bam,*.cram
*.fq,*.vcf
*.bed,*.bai,*.csi,*.crai,*.gz,*.gz.*
*.out,*.expected
aclocal.m4
.git,interesting,wt-*')|tr '\n' ,`
datadir=$HOME/htslib/interesting
exec codespell --ignore-words $datadir/codespell.ignore --exclude-file=$datadir/codespell.exclude --skip "$skip" "$@"
alloced
als
fpr
hist
iff
seeked
som
strat
@jmarshall
Copy link
Author

wt-* is my local convention for additional Git working trees. I create extra ephemeral working trees within my main checked out repository directory for a project and have /wt-* in a global excludesfile. git worktree is fantastic.

(And interesting is for notes, data files, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment