Skip to content

Commit c7bfd04

Browse files
authored
chore: kickoff release
2 parents 0b1a2da + 2abaf4c commit c7bfd04

File tree

343 files changed

+1801
-1296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+1801
-1296
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Resolve SwiftLint errors and warnings
2+
# https://github.com/aws-amplify/amplify-swift/pull/3451
3+
659e8615da059eea5b6a4ce1b77120eae293ebec

.github/workflows/notify_issue_comment.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/swiftlint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: SwiftLint
2+
on:
3+
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
identifier:
7+
required: true
8+
type: string
9+
10+
push:
11+
branches-ignore:
12+
- main
13+
- v1
14+
- release
15+
- release-v1
16+
17+
permissions:
18+
contents: read
19+
20+
concurrency:
21+
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: ${{ github.ref_name != 'main'}}
23+
24+
jobs:
25+
run-swiftlint:
26+
runs-on: ubuntu-latest
27+
container:
28+
image: ghcr.io/realm/swiftlint:0.54.0
29+
steps:
30+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
31+
with:
32+
persist-credentials: false
33+
34+
- name: SwiftLint
35+
run: |
36+
swiftlint --reporter github-actions-logging
37+
38+
confirm-pass:
39+
runs-on: ubuntu-latest
40+
name: Confirm Passing SwiftLint
41+
if: ${{ !cancelled() }}
42+
needs: [ run-swiftlint ]
43+
env:
44+
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
45+
steps:
46+
- run: exit $EXIT_CODE

.swiftlint.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# Do not specify an `included` section at this top-level file. Specify the
22
# `--config` option pointing to this file, and the `--path` option to the files
33
# you wish to lint
4+
included:
5+
- Amplify
6+
- AmplifyPlugins
47

58
excluded:
69
- Pods
710
- .build
11+
- AmplifyAsyncTesting
12+
- AmplifyFunctionalTests
13+
- AmplifyTestApp
14+
- AmplifyTestCommon
15+
- AmplifyTests
16+
- AmplifyPlugins/Core/AWSPluginsCoreTests
17+
- AmplifyPlugins/Core/AWSPluginsTestCommon
18+
- AmplifyPlugins/Notifications/Push/Tests
19+
- AmplifyPlugins/*/Tests
820

921
analyzer_rules:
1022
- unused_import
@@ -18,22 +30,29 @@ closing_brace: error
1830
colon:
1931
severity: error
2032
comma: error
21-
empty_count: warning
33+
empty_count:
34+
severity: warning
2235
empty_enum_arguments: error
2336
function_body_length:
24-
warning: 100
37+
warning: 150
2538
error: 150
2639
identifier_name:
2740
excluded:
2841
- id
2942
- of
3043
- or
3144
line_length:
32-
warning: 120
45+
ignores_urls: true
46+
ignores_function_declarations: true
47+
ignores_comments: true
48+
warning: 160
3349
error: 160
34-
opening_brace: error
50+
opening_brace:
51+
severity: error
3552
return_arrow_whitespace: error
3653
statement_position:
3754
severity: error
3855
todo: warning
3956
trailing_semicolon: error
57+
non_optional_string_data_conversion:
58+
severity: error

Amplify/Categories/API/APICategory.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final public class APICategory: Category {
1111
public var categoryType: CategoryType {
1212
.api
1313
}
14-
14+
1515
var plugins = [PluginKey: APICategoryPlugin]()
1616

1717
/// Returns the plugin added to the category, if only one plugin is added. Accessing this property if no plugins
@@ -49,7 +49,7 @@ final public class APICategory: Category {
4949
public var isConfigured = false
5050

5151
// MARK: - Plugin handling
52-
52+
5353
/// Adds `plugin` to the list of Plugins that implement functionality for this category.
5454
///
5555
/// - Parameter plugin: The Plugin to add

Amplify/Categories/API/ClientBehavior/APICategory+GraphQLBehavior.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
//
77

88
extension APICategory: APICategoryGraphQLBehavior {
9-
9+
1010
// MARK: - Request-based GraphQL operations
1111
public func query<R: Decodable>(request: GraphQLRequest<R>) async throws -> GraphQLTask<R>.Success {
1212
try await plugin.query(request: request)
1313
}
14-
14+
1515
public func mutate<R: Decodable>(request: GraphQLRequest<R>) async throws -> GraphQLTask<R>.Success {
1616
try await plugin.mutate(request: request)
1717
}
18-
18+
1919
public func subscribe<R>(request: GraphQLRequest<R>) -> AmplifyAsyncThrowingSequence<GraphQLSubscriptionEvent<R>> {
2020
plugin.subscribe(request: request)
2121
}

Amplify/Categories/API/ClientBehavior/APICategory+RESTBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
extension APICategory: APICategoryRESTBehavior {
11-
11+
1212
public func get(request: RESTRequest) async throws -> RESTTask.Success {
1313
try await plugin.get(request: request)
1414
}

Amplify/Categories/API/ClientBehavior/APICategoryGraphQLBehavior.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public protocol APICategoryGraphQLBehavior: AnyObject {
1818
/// - listener: The event listener for the operation
1919
/// - Returns: The AmplifyOperation being enqueued
2020
func query<R: Decodable>(request: GraphQLRequest<R>) async throws -> GraphQLTask<R>.Success
21-
21+
2222
/// Perform a GraphQL mutate operation against a previously configured API. This operation
2323
/// will be asynchronous, with the callback accessible both locally and via the Hub.
2424
///
@@ -36,5 +36,7 @@ public protocol APICategoryGraphQLBehavior: AnyObject {
3636
/// - valueListener: Invoked when the GraphQL subscription receives a new value from the service
3737
/// - completionListener: Invoked when the subscription has terminated
3838
/// - Returns: The AmplifyInProcessReportingOperation being enqueued
39-
func subscribe<R: Decodable>(request: GraphQLRequest<R>) -> AmplifyAsyncThrowingSequence<GraphQLSubscriptionEvent<R>>
39+
func subscribe<R: Decodable>(
40+
request: GraphQLRequest<R>
41+
) -> AmplifyAsyncThrowingSequence<GraphQLSubscriptionEvent<R>>
4042
}

Amplify/Categories/API/ClientBehavior/APICategoryRESTBehavior.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public protocol APICategoryRESTBehavior {
2727
/// - Parameter request: Contains information such as path, query parameters, body.
2828
/// - Returns: An operation that can be observed for its value
2929
func post(request: RESTRequest) async throws -> RESTTask.Success
30-
30+
3131
/// Perform an HTTP DELETE operation
3232
///
3333
/// - Parameter request: Contains information such as path, query parameters, body.
3434
/// - Returns: An operation that can be observed for its value
3535
func delete(request: RESTRequest) async throws -> RESTTask.Success
36-
36+
3737
/// Perform an HTTP HEAD operation
3838
///
3939
/// - Parameter request: Contains information such as path, query parameters, body.

Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final class RetryableGraphQLOperation<Payload: Decodable>: Operation, Ret
116116
self.operationFactory = operationFactory
117117
self.resultListener = resultListener
118118
}
119-
119+
120120
public override func main() {
121121
Task {
122122
start(request: await requestFactory())

0 commit comments

Comments
 (0)