From: Siraaj Khandkar Date: Mon, 23 Nov 2020 00:18:34 +0000 (-0500) Subject: Add and apply indent helper recipe X-Git-Tag: 0.4.0~1 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=a2a312fa4493259d1fddb1d1df4314815ac6bb0c;p=tt.git Add and apply indent helper recipe --- diff --git a/Makefile b/Makefile index 4e5863e..882fda6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ +SRC_FILE := tt.rkt + .PHONY: install install: raco pkg install --deps search-auto .PHONY: test test: - raco test ./tt.rkt + raco test ./$(SRC_FILE) .PHONY: remove remove: @@ -13,3 +15,10 @@ remove: .PHONY: clean clean: rm -rf compiled + +### dev helpers ### +# scmindent.rkt : https://github.com/ds26gte/scmindent +# sponge : https://joeyh.name/code/moreutils +.PHONY: indent +indent: + scmindent.rkt < $(SRC_FILE) | sponge $(SRC_FILE) diff --git a/tt.rkt b/tt.rkt index 8930ae9..f444926 100644 --- a/tt.rkt +++ b/tt.rkt @@ -166,7 +166,7 @@ (string-split str (regexp "[\r\n]+"))) (module+ test - (check-equal? (str->lines "abc\ndef\n\nghi") '("abc" "def" "ghi"))) + (check-equal? (str->lines "abc\ndef\n\nghi") '("abc" "def" "ghi"))) (define (str->msgs nick uri str) (filter-map (λ (line) (str->msg nick uri line)) (str->lines str)))