Contents

treatAllWarnings(as:_:)

Controls how all Swift compiler warnings are treated during compilation.

Declaration

static func treatAllWarnings(as level: WarningLevel, _ condition: BuildSettingCondition? = nil) -> SwiftSetting

Parameters

  • level:

    The treatment level for all warnings (.warning or .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.