Inclusive Language

Identifiers should use inclusive language that avoids discrimination against groups of people based on     race, gender, or socioeconomic status
  • Identifier: inclusive_language
  • Enabled by default: Enabled
  • Supports autocorrection: No
  • Kind: style
  • Analyzer rule: No
  • Minimum Swift compiler version: 3.0.0
  • Default configuration: warning, additional_terms: [], override_terms: [], override_allowed_terms: []

Non Triggering Examples

let foo = "abc"
enum AllowList {
    case foo, bar
}
func updateAllowList(add: String) {}
enum WalletItemType {
    case visa
    case mastercard
}
func chargeMasterCard(_ card: Card) {}

Triggering Examples

let slave = "abc"
enum BlackList {
    case foo, bar
}
func updateWhiteList(add: String) {}
enum ListType {
    case whitelist
    case blacklist
}
init(master: String, slave: String) {}
final class FooBar {
    func register<Master, Slave>(one: Master, two: Slave) {}
}