From a2a312fa4493259d1fddb1d1df4314815ac6bb0c Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sun, 22 Nov 2020 19:18:34 -0500 Subject: [PATCH] Add and apply indent helper recipe --- Makefile | 11 ++++++++++- tt.rkt | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) 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))) -- 2.20.1