diff --git a/Makefile b/Makefile index c31eb29..470270d 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ test: check: crystal tool format --check ./bin/ameba + ./scripts/linewidth.sh install: cp mango $(INSTALL_DIR)/mango diff --git a/scripts/linewidth.sh b/scripts/linewidth.sh new file mode 100755 index 0000000..7f76fcb --- /dev/null +++ b/scripts/linewidth.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ ! -z "$(grep '.\{80\}' --exclude-dir=lib --include="*.cr" -nr --color=always . | tee /dev/tty)" ] \ + && echo "The above lines exceed the 80 characters limit" \ + || exit 0