1) Here are some tips & tricks for refactoring: https://developer.apple.com/documentation/xcode/finding-and-...
The “rename in project” and “rename in scope” functions are quite neat.
2) Check out SwiftLint: https://github.com/realm/SwiftLint
I have not used it in a while, but it comes with good defaults and is highly customizable to your own preferred Swift style.