- Install uncrustify
$ brew install uncrustify
$ touch ~/.uncrustify.cfg | open -e ~/.uncrustify.cfg
- Paste the contents of
.uncrustify.cfg
in this repo to the file you just created
- Open
Automator
app - Select
Quick Action
- Search for
Run Shell Script
on the search text field and drag it in - Set the ffg properties
- Workflow receives current: text, in: XCode
- Output replaces selected text: Checked
- Shell script:
export PATH=/usr/local/bin:$PATH
uncrustify -l oc
- In XCode, select the text you want to lint
- Right-click on the text
- Go to services, the select
uncrustify