fastlane-plugin-fastci 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cdc516b58bb5440ca5f24a496c5725a231a19d1986cf26d2ae4f914f2a0bc04
|
|
4
|
+
data.tar.gz: eea7c54fa1c128f082a4d289569b6ddbd191714cb25106365165b7242ee4805f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7851b7b24d473f10d817a365829539e10c6fccbce662a5d4be9d686d2b543f15fb7f80b4f017922b215f630ca5dccda8bccdbb60f1363ab4ef5f60e3949d974c
|
|
7
|
+
data.tar.gz: 878f45bebf4ef2030591a709300cbdaa6e5b01aeed0b5a6b26ad60543a3303827e0fa0c373f1889615549db2abeb18eab3e07480a57844f8383e6425aaef5932
|
|
@@ -36,10 +36,12 @@ module Fastlane
|
|
|
36
36
|
log_dir = File.expand_path(Constants.BUILD_LOG_DIR)
|
|
37
37
|
log_file = sh("ls -t #{log_dir}/*.log | head -n 1").strip
|
|
38
38
|
|
|
39
|
+
yml_file = File.expand_path(".swiftlint.yml")
|
|
40
|
+
|
|
39
41
|
analyze_file = File.expand_path(Constants.SWIFTLINT_ANALYZE_FILE)
|
|
40
42
|
|
|
41
43
|
if is_all
|
|
42
|
-
sh "swiftlint analyze --compiler-log-path #{log_file} > #{analyze_file} || true"
|
|
44
|
+
sh "swiftlint analyze --config #{yml_file} --compiler-log-path #{log_file} --force-exclude > #{analyze_file} || true"
|
|
43
45
|
else
|
|
44
46
|
commit_hash = params[:commit_hash] || read_cached_txt(Constants.COMMIT_HASH_FILE)
|
|
45
47
|
swift_files = CommonHelper.get_git_modified_swift_files(commit_hash)
|
|
@@ -50,7 +52,7 @@ module Fastlane
|
|
|
50
52
|
end
|
|
51
53
|
|
|
52
54
|
files_to_analyze = swift_files.join(" ")
|
|
53
|
-
sh "swiftlint analyze --compiler-log-path #{log_file} #{files_to_analyze} > #{analyze_file} || true"
|
|
55
|
+
sh "swiftlint analyze --config #{yml_file} --compiler-log-path #{log_file} #{files_to_analyze} --force-exclude > #{analyze_file} || true"
|
|
54
56
|
end
|
|
55
57
|
|
|
56
58
|
# 输出代码分析报告
|
|
@@ -170,9 +170,11 @@ module Fastlane
|
|
|
170
170
|
|
|
171
171
|
# 代码分析
|
|
172
172
|
if is_analyze_swiftlint && gym_method != "app-store"
|
|
173
|
-
analyze_swiftlint(
|
|
173
|
+
other_action.analyze_swiftlint(
|
|
174
|
+
is_from_package: true,
|
|
175
|
+
configuration: configuration
|
|
176
|
+
)
|
|
174
177
|
# 结果复制到桌面
|
|
175
|
-
FileUtils.cp(SWIFTLINT_HTML_FILE, target_path)
|
|
176
178
|
FileUtils.cp(SWIFTLINT_ANALYZE_HTML_FILE, target_path)
|
|
177
179
|
UI.message("*************| 代码分析完成 |*************")
|
|
178
180
|
else
|
|
@@ -181,7 +183,9 @@ module Fastlane
|
|
|
181
183
|
|
|
182
184
|
# 重复代码检查
|
|
183
185
|
if is_detect_duplicity_code && gym_method != "app-store"
|
|
184
|
-
detect_code_duplicity(
|
|
186
|
+
other_action.detect_code_duplicity(
|
|
187
|
+
is_all: true
|
|
188
|
+
)
|
|
185
189
|
# 结果复制到桌面
|
|
186
190
|
FileUtils.cp(DUPLICITY_CODE_HTML_FILE, target_path)
|
|
187
191
|
UI.message("*************| 重复代码检查完成 |*************")
|
|
@@ -191,7 +195,7 @@ module Fastlane
|
|
|
191
195
|
|
|
192
196
|
# 无用代码检查
|
|
193
197
|
if is_detect_unused_code && gym_method != "app-store"
|
|
194
|
-
|
|
198
|
+
other_action.detect_unused_code(
|
|
195
199
|
scheme: scheme,
|
|
196
200
|
is_from_package: true,
|
|
197
201
|
configuration: configuration
|
|
@@ -205,7 +209,7 @@ module Fastlane
|
|
|
205
209
|
|
|
206
210
|
# 无用图片检查
|
|
207
211
|
if is_detect_unused_image && gym_method != "app-store"
|
|
208
|
-
|
|
212
|
+
other_action.detect_unused_image()
|
|
209
213
|
# 结果复制到桌面
|
|
210
214
|
FileUtils.cp(Constants.UNUSED_IMAGE_HTML_FILE, target_path)
|
|
211
215
|
UI.message("*************| 无用图片检查完成 |*************")
|