My version of config file for uncrustify for Objective C code.
-
Install brew --> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Install brew completion --> brew install bash-completion git
-
Install uncrustify --> brew install uncrustify
-
Download Xcode plugin from --> https://github.com/benoitsan/BBUncrustifyPlugin-Xcode
-
Place downloaded file in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. Create this directory path if required.
-
Copy uncrustify-GG.cfg to your home directory and rename it to uncrustify.cfg
-
Restart Xcode and see under Edit menu the newly added option to execute.
Command in point 2 is for ObjC headers and implemetations as I provided OC option.
-
Open Terminal and goto source directory. Rrun following command. Here dot is for current directory. --> find . -name '*.m' > list.txt
-
Then run following command, assuming that uncrustify.cfg is placed in your home directory --> uncrustify -c ~/uncrustify.cfg --no-backup -l OC -F list.txt