-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RUMM-1222 Patch linter configuration for swiftlint 0.42.0
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,13 @@ workflows: | |
description: |- | ||
Runs swiftlint and license check for all source and test files. | ||
steps: | ||
- script: | ||
title: Patch linter configuration for swiftlint 0.42.0 | ||
inputs: | ||
- content: |- | ||
#!/usr/bin/env bash | ||
set -e | ||
./tools/lint/patch_if_swiftlint_0.42.0.sh | ||
- [email protected]: | ||
title: Lint Sources/* | ||
inputs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Patches `sources.swiftlint.yml` and `tests.swiftlint.yml` configs for swiftlint `0.42.0`. | ||
# We need to run this patch on Bitrise, as their brew-core mirror doesn't include swiftlint `0.43.1` | ||
# on some agent versions (notably: `Agent version: 1.20.0` considers `0.42.0` as the latest version). | ||
# | ||
# REF: we could eventually switch to the official brew source, but this is discouraged in | ||
# https://discuss.bitrise.io/t/how-to-change-brew-core-from-mirror-to-official/16033 | ||
|
||
# SWIFTLINT_VERSION=$(swiftlint version) | ||
SWIFTLINT_VERSION="0.42.0" | ||
|
||
if [ $SWIFTLINT_VERSION = "0.42.0" ]; then | ||
# Replace "../../" with "" | ||
sed -i '' 's/..\/..\///g' tools/lint/sources.swiftlint.yml | ||
sed -i '' 's/..\/..\///g' tools/lint/tests.swiftlint.yml | ||
fi |