-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
switch indexPath.section {
// Void Function in Ternary Violation: Using ternary to call Void functions should be avoided (void_function_in_ternary)
case 0: isEditing ? CGSize(width: 150, height: 20) : CGSize(width: 100, height: 20)
default: .zero
}
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
if indexPath.section == 0 {
// Void Function in Ternary Violation: Using ternary to call Void functions should be avoided (void_function_in_ternary)
isEditing ? CGSize(width: 150, height: 20) : CGSize(width: 100, height: 20)
} else {
.zero
}
}
### Environment
* SwiftLint version: 0.55.1
* Installation method used: Homebrewejensen, F1248, Pretz, stehlika, vadimbelyaev and 4 moreOliverPearmain
Metadata
Metadata
Assignees
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.