Skip to content

Commit

Permalink
💀 Add skeleton files for upcoming checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahElliott committed Oct 24, 2024
1 parent dc193b1 commit 43cf7bf
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .capt/share.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Captain git-hook manager control file

# Why is there no shellcheck? Doesn't seem to work well for too many things with Zsh.
[pre_commit]
hithere = 'hello $CAPT_FILES_CHANGED'
# redundant with markdownlint but for testing filters etc
doclint = '(md|mkd)mdl $CAPT_FILES_CHANGED' ## check markdown for violations
markdownlint = ''
# -markdownlint
missingnewline = ''
fixmes = 'git-confirm.sh' ## check for FIXMEs etc


[commit_msg]
msglint = ''

[prepare_commit_msg]
br2msg = ''

[post_commit]
colorquote = ''

[post_checkout]
fake-migalert = 'print "faking a checkout trigger"' ## fake a migalert
fake-bundler = 'print "pretending to run bundler"' ## bundle resources


# after a commit is modified by an amend or rebase
[post_rewrite]
# migalert = ''


[pre_push]
# run-test-suite = ''
# nvd = ''


[integration]
colorquote = ''
hi = 'hello some test params'
markdownlint = ''
11 changes: 11 additions & 0 deletions install.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/zsh

# rep, for running unit tests: https://github.com/eraserhd/rep
git clone https://github.com/eraserhd/rep
cd rep
cc -g -O2 -e rep rep.c

# gnu utils mac
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt grep

#
4 changes: 2 additions & 2 deletions msglint
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ else
swc() { wc $@ }
fi

if ! print $line1 | sgrep -q -P '^:(books|sparkles|bug|wrench|cop|check|lock|bomb|tada):( \(#\d{1,}\))*( \[.+\])* [A-Z].*'; then
if ! print $line1 | sgrep -q -P '^:(books|sparkles|bug|wrench|cop|check|lock|bomb|tada|skull):( \(#\d{1,}\))*( \[.+\])* [A-Z].*'; then
print "Message:"
print '>>>'
print $msg
print '<<<'
print 'Message does not match pattern'
print 'Acceptable subjects: (books|sparkles|bug|wrench|cop|check|lock|bomb|tada)'
print 'Acceptable subjects: (books|sparkles|bug|wrench|cop|check|lock|bomb|tada|skull)'
print 'Optional specs: (#123) [topic]'
print 'Proper message: Verb ...'
print "Full example: $example"
Expand Down
5 changes: 5 additions & 0 deletions soqlcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/zsh

### Check soql for things like:
# Date = LAST_WEEK
# Date < LAST_N_DAYS:7
3 changes: 3 additions & 0 deletions spellcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/zsh

### Block commits with typos in strings

0 comments on commit 43cf7bf

Please sign in to comment.