Integrates SwiftLint to lint all the swifts! Closes #16
Questions:
- Anything else you might want in the
.swiftlint.yml
?
- I've added SwiftLint Run Script Build Phases, do you want those?
- I've used
swiftlint --strict
, that work? Or do you prefer it without --strict
Code Changes (not just whitespace):
class ViewController: MessageViewController, UITableViewDataSource, UITableViewDelegate, MessageAutocompleteControllerDelegate
was violating the line_length rule, so I switched it to class ViewController: MessageViewController ... extension ViewController: UITableViewDataSource, etc.
. You may prefer a revert, and just disabling that rule there
- Switching to block-based key-value observing as per SwiftLint rule
Showing All Messages
Test Suite 'All tests' started at 2018-02-03 00:12:09.183
Test Suite 'MessageViewControllerTests.xctest' started at 2018-02-03 00:12:09.184
Test Suite 'MessageViewControllerTests' started at 2018-02-03 00:12:09.185
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' started.
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' started.
MessageViewController/MessageViewControllerTests/MessageViewControllerTests.swift:32: Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' measured [Time, seconds] average: 0.000, relative standard deviation: 143.525%, values: [0.000004, 0.000001, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' passed (0.262 seconds).
Test Suite 'MessageViewControllerTests' passed at 2018-02-03 00:12:09.450.
Executed 2 tests, with 0 failures (0 unexpected) in 0.263 (0.265) seconds
Test Suite 'String_WordAtRangeTests' started at 2018-02-03 00:12:09.451
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' passed (0.002 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' passed (0.000 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' passed (0.001 seconds).
Test Suite 'String_WordAtRangeTests' passed at 2018-02-03 00:12:09.462.
Executed 8 tests, with 0 failures (0 unexpected) in 0.006 (0.011) seconds
Test Suite 'MessageViewControllerTests.xctest' passed at 2018-02-03 00:12:09.462.
Executed 10 tests, with 0 failures (0 unexpected) in 0.270 (0.278) seconds
Test Suite 'All tests' passed at 2018-02-03 00:12:09.463.
Executed 10 tests, with 0 failures (0 unexpected) in 0.270 (0.279) seconds
Test Suite 'All tests' started at 2018-02-03 00:12:09.183
Test Suite 'MessageViewControllerTests.xctest' started at 2018-02-03 00:12:09.184
Test Suite 'MessageViewControllerTests' started at 2018-02-03 00:12:09.185
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' started.
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' started.
MessageViewController/MessageViewControllerTests/MessageViewControllerTests.swift:32: Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' measured [Time, seconds] average: 0.000, relative standard deviation: 143.525%, values: [0.000004, 0.000001, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' passed (0.262 seconds).
Test Suite 'MessageViewControllerTests' passed at 2018-02-03 00:12:09.450.
Executed 2 tests, with 0 failures (0 unexpected) in 0.263 (0.265) seconds
Test Suite 'String_WordAtRangeTests' started at 2018-02-03 00:12:09.451
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' passed (0.002 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' passed (0.000 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' passed (0.001 seconds).
Test Suite 'String_WordAtRangeTests' passed at 2018-02-03 00:12:09.462.
Executed 8 tests, with 0 failures (0 unexpected) in 0.006 (0.011) seconds
Test Suite 'MessageViewControllerTests.xctest' passed at 2018-02-03 00:12:09.462.
Executed 10 tests, with 0 failures (0 unexpected) in 0.270 (0.278) seconds
Test Suite 'All tests' passed at 2018-02-03 00:12:09.463.
Executed 10 tests, with 0 failures (0 unexpected) in 0.270 (0.279) seconds
Test Suite 'MessageViewControllerTests.xctest' started at 2018-02-03 00:12:09.184
Test Suite 'MessageViewControllerTests' started at 2018-02-03 00:12:09.185
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' started.
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testExample]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' started.
MessageViewController/MessageViewControllerTests/MessageViewControllerTests.swift:32: Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' measured [Time, seconds] average: 0.000, relative standard deviation: 143.525%, values: [0.000004, 0.000001, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[MessageViewControllerTests.MessageViewControllerTests testPerformanceExample]' passed (0.262 seconds).
Test Suite 'MessageViewControllerTests' passed at 2018-02-03 00:12:09.450.
Executed 2 tests, with 0 failures (0 unexpected) in 0.263 (0.265) seconds
Test Suite 'String_WordAtRangeTests' started at 2018-02-03 00:12:09.451
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenEmpty]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_thatUsesRightmostWord]' passed (0.002 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenLeftCharacterWhitespace_withRangeIncludingWords_thatUsesRightmostWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenNewline]' passed (0.000 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenRangeWithinWord]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_word_whenWhitespace]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenMultipleCharacters]' passed (0.001 seconds).
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' started.
Test Case '-[MessageViewControllerTests.String_WordAtRangeTests test_wordParts_whenSingleCharacter]' passed (0.001 seconds).
Test Suite 'String_WordAtRangeTests' passed at 2018-02-03 00:12:09.462.
Executed 8 tests, with 0 failures (0 unexpected) in 0.006 (0.011) seconds
Test Suite 'MessageViewControllerTests.xctest' passed at 2018-02-03 00:12:09.462.
Executed 10 tests, with 0 failures (0 unexpected) in 0.270 (0.278) seconds
Testing Complete 2018-02-03, 12:12 AM