Treat *Some* Warnings as Errors in Swift

xcode: how to turn off the treat warning as error only for archiving

Go to the Build Settings and find the "Treat Warnings as Errors" setting. Open the little triangle to the left of the setting and you should see a value for Debug and a value for Release.

Change the Release value to No.

How do I disable warnings being flagged as errors in Xcode

If you open your project in Xcode, then right click on your target in the Targets folder. Select "Get Info" form the drop down menu and then scroll down to the section for the compiler warnings (GCC 4.0 Warnings on my box). Here you can disable the checkboxes for the various warnings you have active. Also check the value of "Other Warning Flags". This could include -Wall or -WMost which will enable other warnings. You can remove that and hopefully your warnings will not appear.

Good luck!

Is it possible to make fixable errors/warnings with SwiftLint?

Answered here by SwiftLint owners: https://github.com/realm/SwiftLint/issues/3315

How to error rather than warning on specific rule

This works in your .swiftlint.yml file:

trailing_whitespace:
severity: error


Related Topics



Leave a reply



Submit