mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

STITCH-1597 Run swiftlint for all build targets #110

Closed adamchel closed 5 years ago

adamchel commented 5 years ago

Drive-Bys

Main Changes This PR adds a linter build phase to every single XCode project in the Stitch.xcworkspace, and resolves all linter warnings and errors except where noted in this PR. I added the following exceptions

The linter build phases treat linter warnings as build warnings, and linter errors as build errors. Linter errors will prevent building from completing and will thus be caught by evergreen, but linter warnings will not currently be caught by Evergreen.

I will open a ticket that adds an evergreen task that runs the linter and verifies there are no linter warnings. This should be straightforward (just running swiftlint in each of the root project directories, checking that there is no stdout output)

This PR also leaves five linter warnings unresolved, all in StitchCoreSDK. Fixing these warnings would involve refactoring CoreStitchAuth to move some logic out into extensions or helper files, and uncommenting some code to make use of a resolved SWIFT ticket. I’ll open a ticket to fix these since we decided refactoring non-trivial lint errors was out scope.

Lastly, I’ll open a ticket for Jason to merge master into the sync branch since there will likely be conflicts and dealing with them may take a non-trivial amount of time.