If you have issues in the currently open file and Xcode knows how to fix them, you can use the shortcut Control Option Command F to let Xcode fix all the issues it knows how to fix.