I do not profess to be a master of Emacs Lisp. But after some time googling I figured out how I can mass code-format the code on some of our large projects at work.
It is pretty likely that you may need to tweak this to get it to work on your machine. Specifically, you’ll have to point the script to the correct location of you clojure-mode installation.
This script calls
emacs in Emacs in —batch mode, which causes Emacs to run non-interacively. We can use
--batch to allow us to write scripts using Emacs. Awesome, I know. :–)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
I recently discovered ShellCheck, a static analysis and linting tool for sh/bash scripts. When I ran it on the original version of my above script it found a number of issues. I really recommend you use it on your own scripts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16