ran swiftlint

This commit is contained in:
Aaron Sky 2020-05-08 13:17:46 -04:00
parent fd055faf61
commit 6e6a8af44e
31 changed files with 209 additions and 211 deletions

View File

@ -17,13 +17,13 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Buildkite", path: "../"),
.package(name: "Buildkite", path: "../")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Example",
dependencies: ["Buildkite"]),
dependencies: ["Buildkite"])
]
)

View File

@ -9,7 +9,7 @@ let package = Package(
.iOS(.v10),
.macOS(.v10_12),
.tvOS(.v10),
.watchOS(.v3),
.watchOS(.v3)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
@ -29,6 +29,6 @@ let package = Package(
dependencies: []),
.testTarget(
name: "BuildkiteTests",
dependencies: ["Buildkite"]),
dependencies: ["Buildkite"])
]
)

View File

@ -87,4 +87,3 @@ private extension Array where Element == URLQueryItem {
append(URLQueryItem(name: "per_page", value: String(pageOptions.perPage)))
}
}

View File

@ -181,7 +181,7 @@ extension Build.Resources {
/// For a pull request build, the git repository of the pull request.
public var pullRequestRepository: String?
public init(commit: String, branch: String, author: Build.Resources.Create.Body.Author? = nil, cleanCheckout: Bool? = nil, env: [String : String]? = nil, ignorePipelineBranchFilters: Bool? = nil, message: String? = nil, metaData: [String : String]? = nil, pullRequestBaseBranch: String? = nil, pullRequestId: Int? = nil, pullRequestRepository: String? = nil) {
public init(commit: String, branch: String, author: Build.Resources.Create.Body.Author? = nil, cleanCheckout: Bool? = nil, env: [String: String]? = nil, ignorePipelineBranchFilters: Bool? = nil, message: String? = nil, metaData: [String: String]? = nil, pullRequestBaseBranch: String? = nil, pullRequestId: Int? = nil, pullRequestRepository: String? = nil) {
self.commit = commit
self.branch = branch
self.author = author
@ -286,7 +286,7 @@ extension Build.Resources {
/// Filters the results by the given build state. The finished state is a shortcut to automatically search for builds with passed, failed, blocked, canceled states.
public var state: [Build.State]
public init(branches: [String] = [], commit: String? = nil, createdFrom: Date? = nil, createdTo: Date? = nil, creator: UUID? = nil, finishedFrom: Date? = nil, includeRetriedJobs: Bool? = nil, metadata: [String : String] = [:], state: [Build.State] = []) {
public init(branches: [String] = [], commit: String? = nil, createdFrom: Date? = nil, createdTo: Date? = nil, creator: UUID? = nil, finishedFrom: Date? = nil, includeRetriedJobs: Bool? = nil, metadata: [String: String] = [:], state: [Build.State] = []) {
self.branches = branches
self.commit = commit
self.createdFrom = createdFrom
@ -300,7 +300,6 @@ extension Build.Resources {
}
}
private extension Array where Element == URLQueryItem {
init(queryOptions: Build.Resources.QueryOptions) {
self.init()

View File

@ -67,7 +67,7 @@ extension Job.Resources {
public var unblocker: UUID?
public var fields: [String: String]
public init(unblocker: UUID? = nil, fields: [String : String] = [:]) {
public init(unblocker: UUID? = nil, fields: [String: String] = [:]) {
self.unblocker = unblocker
self.fields = fields
}

View File

@ -89,7 +89,7 @@ extension Pipeline.Resources {
/// An array of team UUIDs to add this pipeline to. You can find your teams UUID either via the GraphQL API, or on the settings page for a team. This property is only available if your organization has enabled Teams.
public var teamUUIDs: [UUID]?
public init(name: String, repository: URL, steps: [Pipeline.Step], branchConfiguration: String? = nil, cancelRunningBranchBuilds: Bool? = nil, cancelRunningBranchBuildsFilter: String? = nil, defaultBranch: String? = nil, description: String? = nil, env: [String : String]? = nil, providerSettings: Pipeline.Provider.Settings? = nil, skipQueuedBranchBuilds: Bool? = nil, skipQueuedBranchBuildsFilter: String? = nil, teamUUIDs: [UUID]? = nil) {
public init(name: String, repository: URL, steps: [Pipeline.Step], branchConfiguration: String? = nil, cancelRunningBranchBuilds: Bool? = nil, cancelRunningBranchBuildsFilter: String? = nil, defaultBranch: String? = nil, description: String? = nil, env: [String: String]? = nil, providerSettings: Pipeline.Provider.Settings? = nil, skipQueuedBranchBuilds: Bool? = nil, skipQueuedBranchBuildsFilter: String? = nil, teamUUIDs: [UUID]? = nil) {
self.name = name
self.repository = repository
self.steps = steps
@ -160,7 +160,7 @@ extension Pipeline.Resources {
/// Whether the pipeline is visible to everyone, including users outside this organization.
public var visibility: String?
public init(branchConfiguration: String? = nil, cancelRunningBranchBuilds: Bool? = nil, cancelRunningBranchBuildsFilter: String? = nil, defaultBranch: String? = nil, description: String? = nil, env: [String : String]? = nil, name: String? = nil, providerSettings: Pipeline.Provider.Settings? = nil, repository: URL? = nil, steps: [Pipeline.Step]? = nil, skipQueuedBranchBuilds: Bool? = nil, skipQueuedBranchBuildsFilter: String? = nil, visibility: String? = nil) {
public init(branchConfiguration: String? = nil, cancelRunningBranchBuilds: Bool? = nil, cancelRunningBranchBuildsFilter: String? = nil, defaultBranch: String? = nil, description: String? = nil, env: [String: String]? = nil, name: String? = nil, providerSettings: Pipeline.Provider.Settings? = nil, repository: URL? = nil, steps: [Pipeline.Step]? = nil, skipQueuedBranchBuilds: Bool? = nil, skipQueuedBranchBuildsFilter: String? = nil, visibility: String? = nil) {
self.branchConfiguration = branchConfiguration
self.cancelRunningBranchBuilds = cancelRunningBranchBuilds
self.cancelRunningBranchBuildsFilter = cancelRunningBranchBuildsFilter

View File

@ -208,7 +208,7 @@ extension PipelinesTests {
.number(1),
.number(2),
.number(3),
.number(4),
.number(4)
]),
"bigs": .dictionary([
"vending": .string("machine"),

View File

@ -120,7 +120,7 @@ extension MockData {
HTTPURLResponse(url: url,
statusCode: status,
httpVersion: "HTTP/1.1",
headerFields: ["Link":#"<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=3>; rel="prev",<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=5>; rel="next",<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=1>; rel="first", <https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=10>; rel="last""#])!
headerFields: ["Link": #"<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=3>; rel="prev",<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=5>; rel="next",<https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=1>; rel="first", <https://api.buildkite.com/v2/organizations/my-great-org/pipelines/my-pipeline/builds?api_key=f8582f070276d764ce3dd4c6d57be92574dccf86&page=10>; rel="last""#])!
}
}

View File

@ -7,7 +7,7 @@ extension AccessTokensTests {
// to regenerate.
static let __allTests__AccessTokensTests = [
("testAccessTokenDelete", testAccessTokenDelete),
("testAccessTokenGet", testAccessTokenGet),
("testAccessTokenGet", testAccessTokenGet)
]
}
@ -18,7 +18,7 @@ extension AgentsTests {
static let __allTests__AgentsTests = [
("testAgentsGet", testAgentsGet),
("testAgentsList", testAgentsList),
("testAgentsStop", testAgentsStop),
("testAgentsStop", testAgentsStop)
]
}
@ -27,7 +27,7 @@ extension AnnotationsTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__AnnotationsTests = [
("testAnnotationsList", testAnnotationsList),
("testAnnotationsList", testAnnotationsList)
]
}
@ -40,7 +40,7 @@ extension ArtifactsTests {
("testArtifactsDownload", testArtifactsDownload),
("testArtifactsGet", testArtifactsGet),
("testArtifactsListByBuild", testArtifactsListByBuild),
("testArtifactsListByJob", testArtifactsListByJob),
("testArtifactsListByJob", testArtifactsListByJob)
]
}
@ -56,7 +56,7 @@ extension BuildkiteTests {
("testClosureBasedRequestNoContent", testClosureBasedRequestNoContent),
("testClosureBasedRequestUnsuccessfulResponse", testClosureBasedRequestUnsuccessfulResponse),
("testClosureBasedRequestWithPagination", testClosureBasedRequestWithPagination),
("testFailureFromTransport", testFailureFromTransport),
("testFailureFromTransport", testFailureFromTransport)
]
}
@ -72,7 +72,7 @@ extension BuildsTests {
("testBuildsListAllSpecializedQuery", testBuildsListAllSpecializedQuery),
("testBuildsListForOrganization", testBuildsListForOrganization),
("testBuildsListForPipeline", testBuildsListForPipeline),
("testBuildsRebuild", testBuildsRebuild),
("testBuildsRebuild", testBuildsRebuild)
]
}
@ -81,7 +81,7 @@ extension EmojisTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__EmojisTests = [
("testEmojisList", testEmojisList),
("testEmojisList", testEmojisList)
]
}
@ -94,7 +94,7 @@ extension JobsTests {
("testJobsEnvironmentVariables", testJobsEnvironmentVariables),
("testJobsLogOutput", testJobsLogOutput),
("testJobsRetry", testJobsRetry),
("testJobsUnblock", testJobsUnblock),
("testJobsUnblock", testJobsUnblock)
]
}
@ -104,7 +104,7 @@ extension OrganizationsTests {
// to regenerate.
static let __allTests__OrganizationsTests = [
("testOrganizationsGet", testOrganizationsGet),
("testOrganizationsList", testOrganizationsList),
("testOrganizationsList", testOrganizationsList)
]
}
@ -118,7 +118,7 @@ extension PipelinesTests {
("testPipelinesDelete", testPipelinesDelete),
("testPipelinesGet", testPipelinesGet),
("testPipelinesList", testPipelinesList),
("testPipelinesUpdate", testPipelinesUpdate),
("testPipelinesUpdate", testPipelinesUpdate)
]
}
@ -127,7 +127,7 @@ extension StatusCodeTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__StatusCodeTests = [
("testFlag", testFlag),
("testFlag", testFlag)
]
}
@ -136,7 +136,7 @@ extension TeamsTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__TeamsTests = [
("testTeamsList", testTeamsList),
("testTeamsList", testTeamsList)
]
}
@ -146,7 +146,7 @@ extension TransportTests {
// to regenerate.
static let __allTests__TransportTests = [
("testURLSessionSendClosureBasedRequest", testURLSessionSendClosureBasedRequest),
("testURLSessionSendClosureBasedRequestFailure", testURLSessionSendClosureBasedRequestFailure),
("testURLSessionSendClosureBasedRequestFailure", testURLSessionSendClosureBasedRequestFailure)
]
}
@ -155,7 +155,7 @@ extension UsersTests {
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__UsersTests = [
("testUserMe", testUserMe),
("testUserMe", testUserMe)
]
}
@ -174,7 +174,7 @@ public func __allTests() -> [XCTestCaseEntry] {
testCase(StatusCodeTests.__allTests__StatusCodeTests),
testCase(TeamsTests.__allTests__TeamsTests),
testCase(TransportTests.__allTests__TransportTests),
testCase(UsersTests.__allTests__UsersTests),
testCase(UsersTests.__allTests__UsersTests)
]
}
#endif