jemmons/BagOfTricks

View on GitHub

Showing 104 of 104 total issues

Operators should be surrounded by a single whitespace when they are being used.
Open

  public init(threshold: TimeInterval, refractoryPeriod: TimeInterval? = 1, perform: @escaping ()->Void) {

Return arrow and return type should be separated by a single space or on a separate line.
Open

public func flatMap<FromValue, ToValue>(_ completion: @escaping (Result<ToValue, Error>)->Void, transform: @escaping (FromValue)throws->ToValue) -> (Result<FromValue, Error>)->Void {

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals.
Open

  public static func + (lhs:[Key:Value], rhs:[Key:Value]) -> [Key:Value]{

Top-level declarations should specify Access Control Level keywords explicitly.
Open

let package = Package(
Severity: Minor
Found in Package.swift by swiftlint

Three lines between top-level items.
Open

}

Return arrow and return type should be separated by a single space or on a separate line.
Open

  private let handler: ()->Void

Operators should be surrounded by a single whitespace when they are being used.
Open

  print("\n⏱\(name): \(nanoInterval/1_000_000_000.0)s\n")

Return arrow and return type should be separated by a single space or on a separate line.
Open

  public init(factory: @escaping ()->T?) {

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals.
Open

  public static func + (lhs:[Key:Value], rhs:[Key:Value]) -> [Key:Value]{

Return arrow and return type should be separated by a single space or on a separate line.
Open

  public init(factory: @escaping ()->T) {

Force tries should be avoided.
Open

    try! self.init(fraction.clamp(to: 0...1))

Operators should be surrounded by a single whitespace when they are being used.
Open

  private let factory: ()->T?

Three lines between top-level items.
Open

}

Expected space after comment.
Open

//public struct Forgetful<Value> {

Return arrow and return type should be separated by a single space or on a separate line.
Open

public func map<FromValue, ToValue>(_ completion: @escaping (Result<ToValue, Error>)->Void, transform: @escaping (FromValue)->ToValue) -> (Result<FromValue, Error>)->Void {

Files should have a single trailing newline.
Open

There must be two or zero lines between second-level items.
Open

  private var maybe: MaybeMemo<T>

Three lines between top-level items.
Open

import Foundation

Three lines between top-level items.
Open

}

Operators should be surrounded by a single whitespace when they are being used.
Open

  public init(factory: @escaping ()->T?) {
Severity
Category
Status
Source
Language