File tree 4 files changed +437
-4
lines changed
AmplifySwiftXcode/AmplifySwiftXcode.xcodeproj
4 files changed +437
-4
lines changed Original file line number Diff line number Diff line change
1
+ # Resolve SwiftLint errors and warnings
2
+ # https://github.com/aws-amplify/amplify-swift/pull/3451
3
+ 659e8615da059eea5b6a4ce1b77120eae293ebec
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 1
1
# Do not specify an `included` section at this top-level file. Specify the
2
2
# `--config` option pointing to this file, and the `--path` option to the files
3
3
# you wish to lint
4
+ included :
5
+ - Amplify
6
+ - AmplifyPlugins
4
7
5
8
excluded :
6
9
- Pods
7
10
- .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
8
20
9
21
analyzer_rules :
10
22
- unused_import
@@ -18,22 +30,29 @@ closing_brace: error
18
30
colon :
19
31
severity : error
20
32
comma : error
21
- empty_count : warning
33
+ empty_count :
34
+ severity : warning
22
35
empty_enum_arguments : error
23
36
function_body_length :
24
- warning : 100
37
+ warning : 150
25
38
error : 150
26
39
identifier_name :
27
40
excluded :
28
41
- id
29
42
- of
30
43
- or
31
44
line_length :
32
- warning : 120
45
+ ignores_urls : true
46
+ ignores_function_declarations : true
47
+ ignores_comments : true
48
+ warning : 160
33
49
error : 160
34
- opening_brace : error
50
+ opening_brace :
51
+ severity : error
35
52
return_arrow_whitespace : error
36
53
statement_position :
37
54
severity : error
38
55
todo : warning
39
56
trailing_semicolon : error
57
+ non_optional_string_data_conversion :
58
+ severity : error
You can’t perform that action at this time.
0 commit comments