Skip to content

Commit

Permalink
update swiftlint.yml filepath and address errors
Browse files Browse the repository at this point in the history
  • Loading branch information
atierian committed Sep 21, 2022
1 parent 83b3c9f commit c180486
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class EventRecorder: AnalyticsEventRecording {
func submitAllEvents() async throws -> [PinpointEvent] {
submittedEvents = []
let eventsBatch = try getBatchRecords()
if eventsBatch.count > 0 {
if eventsBatch.count > 0 { // swiftlint:disable:this empty_count
let endpointProfile = await endpointClient.currentEndpointProfile()
try await processBatch(eventsBatch, endpointProfile: endpointProfile)
}
Expand All @@ -96,7 +96,7 @@ class EventRecorder: AnalyticsEventRecording {
try await submit(pinpointEvents: eventBatch, endpointProfile: endpointProfile)
try storage.removeFailedEvents()
let nextEventsBatch = try getBatchRecords()
if nextEventsBatch.count > 0 {
if nextEventsBatch.count > 0 { // swiftlint:disable:this empty_count
try await processBatch(nextEventsBatch, endpointProfile: endpointProfile)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ class AWSS3Adapter: AWSS3Behavior {
/// - Parameters:
/// - request: request
/// - completion: handler which returns a result with uploadId
func createMultipartUpload(_ request: CreateMultipartUploadRequest, completion: @escaping (Result<AWSS3CreateMultipartUploadResponse, StorageError>) -> Void) {
func createMultipartUpload(
_ request: CreateMultipartUploadRequest,
completion: @escaping (Result<AWSS3CreateMultipartUploadResponse, StorageError>) -> Void
) {
Task {
let input = CreateMultipartUploadInput(bucket: request.bucket,
cacheControl: request.cacheControl,
Expand Down Expand Up @@ -117,7 +120,10 @@ class AWSS3Adapter: AWSS3Behavior {
/// - Parameters:
/// - request: request which includes uploadId
/// - completion: handler which returns a result with object details
func completeMultipartUpload(_ request: AWSS3CompleteMultipartUploadRequest, completion: @escaping (Result<AWSS3CompleteMultipartUploadResponse, StorageError>) -> Void) {
func completeMultipartUpload(
_ request: AWSS3CompleteMultipartUploadRequest,
completion: @escaping (Result<AWSS3CompleteMultipartUploadResponse, StorageError>) -> Void
) {
Task {
let parts = request.parts.map {
S3ClientTypes.CompletedPart(eTag: $0.eTag, partNumber: $0.partNumber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AWSS3StorageService: AWSS3StorageServiceBehaviour, StorageServiceProxy {
let awsS3 = AWSS3Adapter(s3Client, config: clientConfig)
let preSignedURLBuilder = AWSS3PreSignedURLBuilderAdapter(config: clientConfig, bucket: bucket)

var _sessionConfiguration: URLSessionConfiguration
var _sessionConfiguration: URLSessionConfiguration // swiftlint:disable:this identifier_name
if let sessionConfiguration = sessionConfiguration {
_sessionConfiguration = sessionConfiguration
} else {
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SwiftLintPlugin/plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct SwiftLintPlugin: BuildToolPlugin {
"--path",
target.directory.string,
"--config",
"\(context.package.directory.string)/Plugins/SwiftLintPlugin/.swiftlint.yml",
"\(context.package.directory.string)/Plugins/SwiftLintPlugin/swiftlint.yml",
],
environment: [:]
)
Expand Down
2 changes: 1 addition & 1 deletion Plugins/SwiftLintPlugin/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ identifier_name:
- or
line_length:
warning: 120
error: 160
error: 300 # 160
opening_brace: error
return_arrow_whitespace: error
statement_position:
Expand Down

0 comments on commit c180486

Please sign in to comment.