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

Commit 69911f8

Browse files
committed
Define SwiftLint version and run it on CI
1 parent b2fd35f commit 69911f8

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.buildkite/pipeline.yml

Lines changed: 11 additions & 2 deletions
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
# Common environment values to use with the `env` key.
66
env: &common_env
77
IMAGE_ID: xcode-15.0.1
@@ -33,8 +33,17 @@ steps:
3333
plugins: *common_plugins
3434

3535
#################
36-
# Lint
36+
# Linters
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,3 +1,5 @@
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
35

Podfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ APP_IOS_DEPLOYMENT_TARGET = Gem::Version.new('13.0')
99

1010
platform :ios, APP_IOS_DEPLOYMENT_TARGET
1111

12+
def swiftlint_version
13+
require 'yaml'
14+
15+
YAML.load_file('.swiftlint.yml')['swiftlint_version']
16+
end
17+
1218
def wordpresskit_pods
1319
pod 'Alamofire', '~> 4.8.0'
1420
pod 'WordPressShared', '~> 2.0.0-beta.2'
@@ -35,7 +41,7 @@ target 'WordPressKitTests' do
3541
end
3642

3743
abstract_target 'Tools' do
38-
pod 'SwiftLint', '~> 0.54'
44+
pod 'SwiftLint', swiftlint_version
3945
end
4046

4147
# Let Pods targets inherit deployment target from the app

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ DEPENDENCIES:
2828
- OCMock (~> 3.4)
2929
- OHHTTPStubs (~> 9.0)
3030
- OHHTTPStubs/Swift (~> 9.0)
31-
- SwiftLint (~> 0.54)
31+
- SwiftLint (= 0.54.0)
3232
- UIDeviceIdentifier (~> 2.0)
3333
- WordPressShared (~> 2.0.0-beta.2)
3434
- wpxmlrpc (~> 0.10.0)
@@ -54,6 +54,6 @@ SPEC CHECKSUMS:
5454
WordPressShared: f93f99269258b46dad04f4e4dbf540ce2e5c1e66
5555
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
5656

57-
PODFILE CHECKSUM: 9ca3a8756de542f45541c503cc23e3166b215206
57+
PODFILE CHECKSUM: a06b4d2f7183f40a91a0f219ca399141aee28c5f
5858

5959
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)