diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 11:44:09 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 11:44:09 +0200 |
| commit | 629ec29e33506a9bf96f552dcc2e6b6cd0560916 (patch) | |
| tree | 5d7ff9fd4b938764a4f9a98cc09b03b5fb2fdc6c /scripts | |
| parent | 0e56395aaa46359974a5eb21acaab32b2ea02a0f (diff) | |
| download | krino-629ec29e33506a9bf96f552dcc2e6b6cd0560916.tar.gz krino-629ec29e33506a9bf96f552dcc2e6b6cd0560916.zip | |
gui: the toolbar in the order things happen, and an About block
The Plan bar now reads left to right as the work does: which
directory, how it should be listed, what of it, where it is on disk -
then Scan, and only then what to do with what came back. Scan carries
the theme's accent, being the button that starts everything.
Settings ends with About: the program and the version it was built
as, what it is in a sentence, the licence, and who to write to. The
text is model.About so it is tested; ui.Version is stamped by main.
leak-check knows krino's own contact address, so the address check
stays useful without a per-clone setting.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/leak-check | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/leak-check b/scripts/leak-check index fbbd5d5..1a27eec 100755 --- a/scripts/leak-check +++ b/scripts/leak-check @@ -13,7 +13,8 @@ # Keep that file outside the repository so the list is never published. # # A line matching the regex in `git config krino.leakallow` is never -# reported (for example a public contact address in the README). +# reported (for example a second address of your own). krino's own public +# contact address is exempt from the address check without any such setting. # # Prints file:line for each hit, never the matched text, so a hit on a # private pattern does not echo the secret. Exits 0 when clean, 1 when @@ -24,13 +25,22 @@ set -eu cd "$(git rev-parse --show-toplevel)" allow=$(git config --get krino.leakallow || true) +# krino's own contact address, published on purpose in README and About. +# Exempt from the address check only, so any clone's `make ci` is clean. +public='contact@labunix\.xyz' +exempt= hits=0 # check LABEL GREP-ARGS...: report staged lines that match, as file:line. +# $exempt, when set, widens $allow for this one call. check() { label=$1 shift - out=$(git grep --cached -n -I "$@" | { if [ -n "$allow" ]; then grep -v -E -i -e "$allow"; else cat; fi; } | cut -d: -f1,2 || true) + filter=$allow + if [ -n "$exempt" ]; then + filter=${filter:+$filter|}$exempt + fi + out=$(git grep --cached -n -I "$@" | { if [ -n "$filter" ]; then grep -v -E -i -e "$filter"; else cat; fi; } | cut -d: -f1,2 || true) if [ -n "$out" ]; then printf 'leak-check: %s:\n%s\n' "$label" "$out" | sed '2,$s/^/ /' >&2 hits=1 @@ -42,7 +52,9 @@ if [ -n "$home" ]; then check "your home directory ($home)" -F -e "$home" -- . fi +exempt=$public check "an email address" -E -e '[[:alnum:]._%+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}' -- . ':(exclude)LICENSE' +exempt= list=$(git config --type=path --get krino.leakpatterns || true) if [ -z "$list" ]; then |
