diff --git a/README.md b/README.md index 0553bd8..4d76df3 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ it to the repo, if the file has bad syntax, it will not be added to the repo. - Javascript (via node) - Go (via gofmt) +- Rust (via rustfmt) Support comes from external linkers, we are merely a "linker curator" package. diff --git a/g b/g index 7acab2a..23fae8f 100755 --- a/g +++ b/g @@ -27,6 +27,11 @@ do_add() { php -l $file && git $CMD $file printf "$(tput sgr0)" ;; + *.rs ) + printf "$(tput setaf 1)" + rustfmt $file && git $CMD $file + printf "$(tput sgr0)" + ;; * ) echo "$(tput setaf 3)Warning, file extension is Unchecked, please add a checker to g (https://github.com/dataf3l/g), with your help, we can have a world where nothing is Unchecked.$(tput sgr0)" git $CMD $file