Skip to content

Commit

Permalink
Fix SwiftLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bcylin committed Sep 30, 2018
1 parent 1c36ec9 commit 6ab1f1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Example/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
disabled_rules:
- line_length
- vertical_whitespace
identifier_name:
excluded:
- id
- pi
- to
included:
- ../Pickle
excluded:
Expand Down
4 changes: 2 additions & 2 deletions Pickle/Classes/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ extension ImagePickerController: UIImagePickerControllerDelegate, UINavigationCo
}

// Instead of using UIImagePickerControllerEditedImage, crop the original image for higher resolution if UIImagePickerControllerCropRect is specified.
var croppedImage: UIImage? = nil
var croppedImage: UIImage?
if let cropRect = info[UIImagePickerControllerCropRect] as? CGRect, let cgImage = originalImage.cgImage?.cropping(to: cropRect) {
croppedImage = UIImage(cgImage: cgImage, scale: originalImage.scale, orientation: originalImage.imageOrientation)
}
Expand Down Expand Up @@ -296,7 +296,7 @@ extension ImagePickerController: PhotoGalleryViewControllerDelegate {
} else {
switch allowedSelections {
case .limit(to: let number) where 1 < number && selectedAssets.count < number:
fallthrough // swiftlint:disable:this fallthrough
fallthrough // swiftlint:disable:this no_fallthrough_only
case .unlimited:
selectedAssets.append(asset)
imagePickerDelegate?.imagePickerController?(self, didSelectImageAsset: asset)
Expand Down

0 comments on commit 6ab1f1a

Please sign in to comment.