How to Setup Swift Format on XCode 14
Вставка
- Опубліковано 2 сер 2024
- Today we learn how to setup SwiftFormat in our iOS project to automatically format our swift code to follow predefined conventions.
Resources:
github.com/nicklockwood/Swift...
Say Hi on Social Media:
LinkedIn: /
Instagram: its_macco?...
Twitter: / its_macco
Introduction 00:00
Install SwiftFormat 01:00
SwiftFormat Config 03:49 - Наука та технологія
nice one!
tutorial suggestion, I believe if you do it, you will be the only one on UA-cam and probably everywhere that did it:
-explain Build Settings, Build Phases and other similar stuff which is often a hidden solution for Xcode problems. So explain as much of the stuff like "Other linker flags", "Compile sources", "App Groups" as you can. thanks!
Sounds like a great idea.
I’ll do that. Thank you 😊
🔥
Really nice content! Congrats.
Random question: which program do you use to record your screen + camera?
Good stuff Emmanuel! I have seen this repo before but never seen it in action.
Thanks Dave
It’s a pretty powerful repo 😄
# format options
--binarygrouping none
--decimalgrouping none
--octalgrouping none
--exponentcase lowercase
--header ignore
--ifdef outdent
--indent 2
--maxwidth 120
--self init-only
--stripunusedargs unnamed-only
--swiftversion 5
--trimwhitespace always
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first
--xcodeindentation enabled
--nospaceoperators ...,..>,..<
# rules
--enable isEmpty
--enable blankLineAfterImports
--disable wrapArguments
--disable trailingCommas
Good tutorial! Hate when people clip every other second and just spell out definitions instead of explaining things their own way.
Updated install code: brew install swift-format
hey macco, im also an iOS engineer. Will you be interested in paid consultation to me 1 on 1 in your free time. because i want to be like you in future. please reply?
Ask if you want i can help you for free
That sounds like a great idea.
You can send me an email at okwarae.n@gmail.com to discuss further.