Revert "[CHORE] Upgrade project to latest Xcode & Swift 5"#2690
Conversation
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 161 characters (line_length)
|
|
||
| if let linkUrlString = self?.unescaped(string: linkUrlString), let url = URL(string: linkUrlString) ?? URL(string: linkUrlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? linkUrlString) { | ||
| attributedString.addAttribute(NSAttributedString.Key.link, value: url, range: string().range(of: linkTextString)) | ||
| attributedString.addAttribute(NSLinkAttributeName, value: url, range: string().range(of: linkTextString)) |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 121 characters (line_length)
| leadFormattingBlock(attributedString, NSRange(location: match.range(at: 1).location, length: match.range(at: 2).location - match.range(at: 1).location), level) | ||
| let level = match.rangeAt(1).length | ||
| formattingBlock?(attributedString, match.rangeAt(2), level) | ||
| leadFormattingBlock(attributedString, NSRange(location: match.rangeAt(1).location, length: match.rangeAt(2).location - match.rangeAt(1).location), level) |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 165 characters (line_length)
| addItalicParsingWithFormattingBlock { attributedString, range in | ||
| attributedString.enumerateAttributes(in: range, options: []) { attributes, range, _ in | ||
| if let font = attributes[NSAttributedString.Key.font] as? UIFont, let boldFont = self.strongAttributes[NSAttributedString.Key.font] as? UIFont, font == boldFont { | ||
| if let font = attributes[NSFontAttributeName] as? UIFont, let boldFont = self.strongAttributes[NSFontAttributeName] as? UIFont, font == boldFont { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 166 characters (line_length)
| addStrongParsingWithFormattingBlock { attributedString, range in | ||
| attributedString.enumerateAttributes(in: range, options: []) { attributes, range, _ in | ||
| if let font = attributes[NSAttributedString.Key.font] as? UIFont, let italicFont = self.italicAttributes[NSAttributedString.Key.font] as? UIFont, font == italicFont { | ||
| if let font = attributes[NSFontAttributeName] as? UIFont, let italicFont = self.italicAttributes[NSFontAttributeName] as? UIFont, font == italicFont { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 170 characters (line_length)
| internal struct TableKey<T: Hashable>: Hashable { | ||
| @usableFromInline | ||
| internal let pointeeHashValue: Int | ||
| internal let hashValue: Int |
There was a problem hiding this comment.
Legacy Hashing Violation: Prefer using the hash(into:) function instead of overriding hashValue (legacy_hashing)
| /// - Complexity: O(n) | ||
| @inlinable | ||
| init(source: Collection, target: Collection) { | ||
| public init(source: Collection, target: Collection) { |
There was a problem hiding this comment.
Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 29 (cyclomatic_complexity)
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 160 lines (function_body_length)
| /// - Complexity: O(n) | ||
| @inlinable | ||
| init(source: Collection, target: Collection, section: Int) { | ||
| public init(source: Collection, target: Collection, section: Int) { |
There was a problem hiding this comment.
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 42 lines (function_body_length)
| post_install do |installer| | ||
| swift42Targets = ['RCMarkdownParser', 'MobilePlayer'] | ||
| swift3Targets = ['MobilePlayer', 'RCMarkdownParser'] | ||
| swift42Targets = ['SwipeCellKit'] |
There was a problem hiding this comment.
Naming/VariableName: Use snake_case for variable names.
|
|
||
| post_install do |installer| | ||
| swift42Targets = ['RCMarkdownParser', 'MobilePlayer'] | ||
| swift3Targets = ['MobilePlayer', 'RCMarkdownParser'] |
There was a problem hiding this comment.
Naming/VariableName: Use snake_case for variable names.
Style/WordArray: Use %w or %W for an array of words.
| parser.linkAttributes = [.foregroundColor: UIColor.darkGray] | ||
| parser.strongAttributes = [NSAttributedString.Key.font.rawValue: MessageTextFontAttributes.boldFont] | ||
| parser.italicAttributes = [NSAttributedString.Key.font.rawValue: MessageTextFontAttributes.italicFont] | ||
| parser.strikeAttributes = [NSAttributedString.Key.strikethroughStyle.rawValue: NSNumber(value: NSUnderlineStyle.single.rawValue)] |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 137 characters (line_length)
| var codeAttributes: [NSAttributedString.Key: Any] = [.backgroundColor: attributes.codeBackgroundColor] | ||
| codeAttributes[.foregroundColor] = attributes.codeTextColor | ||
| codeAttributes[.font] = MessageTextFontAttributes.monoSpacedFont | ||
| var codeAttributes: [String: Any] = [NSAttributedString.Key.backgroundColor.rawValue: attributes.codeBackgroundColor] |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)
| switch gesture.state { | ||
| case .began: | ||
| if let swipeable = scrollView?.swipeables.first(where: { $0.state == .dragging }) as? UIView, self.swipeable != nil, swipeable != self.swipeable! { | ||
| if let swipeable = scrollView?.swipeables.first(where: { $0.state == .dragging }) as? UIView, swipeable != self.swipeable { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 135 characters (line_length)

Reverts #2689
This merge started causing some weird bugs on the list of messages, will revert it for now.