Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 000cbf2

Browse files
authored
Tooling: Define SwiftLint version and run on CI (#839)
2 parents 3de8022 + 60aa1c2 commit 000cbf2

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Nodes with values to reuse in the pipeline.
22
common_params:
33
plugins: &common_plugins
4-
- automattic/a8c-ci-toolkit#3.0.1
4+
- automattic/a8c-ci-toolkit#3.1.0
55
env: &common_env
66
IMAGE_ID: xcode-15.0.1
77

@@ -35,6 +35,15 @@ steps:
3535
#################
3636
# Lint
3737
#################
38+
- label: ":swift: SwiftLint"
39+
command: run_swiftlint --strict
40+
plugins: *common_plugins
41+
notify:
42+
- github_commit_status:
43+
context: "SwiftLint"
44+
agents:
45+
queue: "default"
46+
3847
- label: "🧹 Lint"
3948
key: "lint"
4049
command: |

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
swiftlint_version: 0.54.0
2+
13
parent_config: https://raw.githubusercontent.com/Automattic/swiftlint-config/0f8ab6388bd8d15a04391825ab125f80cfb90704/.swiftlint.yml
24
remote_timeout: 10.0

Podfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,17 @@ target 'AuthenticatorDemo' do
6363
pod 'WordPressAuthenticator', path: '.'
6464
end
6565

66-
# Used to donwload CLI tools.
66+
## Tools
67+
## ==========
68+
##
69+
def swiftlint_version
70+
require 'yaml'
71+
72+
YAML.load_file('.swiftlint.yml')['swiftlint_version']
73+
end
74+
6775
abstract_target 'Tools' do
68-
pod 'SwiftLint', '~> 0.49'
76+
pod 'SwiftLint', swiftlint_version
6977
end
7078

7179
post_install do |installer|

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ DEPENDENCIES:
3333
- OCMock (~> 3.4)
3434
- Specta (= 1.0.7)
3535
- SVProgressHUD (= 2.2.5)
36-
- SwiftLint (~> 0.49)
36+
- SwiftLint (= 0.54.0)
3737
- WordPressAuthenticator (from `.`)
3838
- WordPressKit (~> 13.0)
3939
- WordPressShared (~> 2.1-beta)
@@ -78,6 +78,6 @@ SPEC CHECKSUMS:
7878
WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06
7979
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
8080

81-
PODFILE CHECKSUM: 403e1fb88c6b793469ae1895887ac6fdca395e9f
81+
PODFILE CHECKSUM: 7a63d2e16ee1b72e07e52ac84a3695578b714447
8282

8383
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)