Skip to content

Swift 3#74

Merged
mattrubin merged 26 commits into
swift-3from
swift-3-conversion
Jul 22, 2016
Merged

Swift 3#74
mattrubin merged 26 commits into
swift-3from
swift-3-conversion

Conversation

@mattrubin

Copy link
Copy Markdown
Owner

Convert the project from Swift 2.3 to Swift 3. (Xcode 8.0 beta 3)

XCTAssertEqual(path.substring(from: path.index(after: path.startIndex)), name, "The url path should be \"\(name)\"")

let urlComponents = NSURLComponents(URL:url, resolvingAgainstBaseURL:false)
let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 107 characters (line_length)

]
for (counter, expectedPassword) in expectedValues {
let generator = Generator(factor: .Counter(counter), secret: secret, algorithm: .SHA1, digits: 6)
let generator = Generator(factor: .counter(counter), secret: secret, algorithm: .SHA1, digits: 6)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 100 characters or less: currently 109 characters (line_length)

@mattrubin mattrubin added this to the 3.0 milestone Jul 21, 2016
Comment thread Sources/Token+URL.swift

/// Attempts to initialize a token represented by the give URL.
public init?(url: NSURL, secret: NSData? = nil) {
public init?(url: URL, secret: Data? = nil) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid Docs Violation: Documented declarations should be valid. (valid_docs)

guard let generator = Generator(factor: .Counter(0), secret: NSData(), algorithm: .SHA1, digits: 6),
let other_generator = Generator(factor: .Counter(1), secret: NSData(), algorithm: .SHA512, digits: 8) else {
guard let generator = Generator(factor: .counter(0), secret: Data(), algorithm: .SHA1, digits: 6),
let other_generator = Generator(factor: .counter(1), secret: Data(), algorithm: .SHA512, digits: 8) else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional Binding Cascade Violation: Repeated let statements in conditional binding cascade should be avoided. (conditional_binding_cascade)
Line Length Violation: Line should be 100 characters or less: currently 118 characters (line_length)

@mattrubin mattrubin merged commit e4c9bdb into swift-3 Jul 22, 2016
@mattrubin mattrubin deleted the swift-3-conversion branch July 22, 2016 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants