pickware / style-guide

How we work with code
0 stars 0 forks source link

Disable SwiftLint rule `discouraged_optional_collection` for tests #51

Closed svenmuennich closed 4 years ago

svenmuennich commented 4 years ago

The rule discouraged_optional_collection enforces to never make collection types optional but instead just use empty collections. However, testing for != nil or == nil is way more expressive in tests than checking for an empty collection. Hence the rule needs to be disabled for test configurations,