---
title: WarningLevel
framework: swift-package-manager
role: symbol
role_heading: Enumeration
path: swift-package-manager/documentation/packagedescription/warninglevel
---

# WarningLevel

The level at which a compiler warning should be treated.

## Declaration

```swift
enum WarningLevel
```

## Overview

Overview This enum is used with the SwiftSetting.treatAllWarnings(as:_:) and SwiftSetting.treatWarning(name:as:_:) methods to control how warnings are handled during compilation.

## Topics

### Enumeration Cases

- [WarningLevel.error](swift-package-manager/documentation/packagedescription/warninglevel/error.md)
- [WarningLevel.warning](swift-package-manager/documentation/packagedescription/warninglevel/warning.md)

### Initializers

- [init(rawValue:)](swift-package-manager/documentation/packagedescription/warninglevel/init(rawvalue:).md)

### Default Implementations

- [Equatable Implementations](swift-package-manager/documentation/packagedescription/warninglevel/equatable-implementations.md)
- [RawRepresentable Implementations](swift-package-manager/documentation/packagedescription/warninglevel/rawrepresentable-implementations.md)

## Relationships

### Conforms To

- Swift.Equatable
- Swift.Hashable
- Swift.RawRepresentable
