treatAllWarnings(as:_:)
Controls how all Swift compiler warnings are treated during compilation.
Declaration
static func treatAllWarnings(as level: WarningLevel, _ condition: BuildSettingCondition? = nil) -> SwiftSettingParameters
- level:
The treatment level for all warnings (
.warningor.error). - condition:
A condition that restricts the application of the build setting.
Discussion
Use this setting to specify whether all warnings should be treated as warnings (default behavior) or as errors. This is equivalent to passing -warnings-as-errors or -no-warnings-as-errors to the Swift compiler.
This setting applies to all warnings emitted by the Swift compiler. To control specific warnings individually, use treatWarning(name:as:_:) instead.