fastlane-plugin-ciutils 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0d65ab73b252a6e36cd9f6021f3e67fb3427b05
|
4
|
+
data.tar.gz: c5f048d5e095409ac658ecfe0e7529b3071baa5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d916eeb97307c8f4b65608b77e7998e1ac1c41f4b9217dbdc98367426be3ea249c84b215e4318a771ad3e522d2a5a3eeed085648646a5a6144e0f965150828f
|
7
|
+
data.tar.gz: 56913f7fec5fc1d579708499ec400b318982cb6971cccff87765a136a2c1070e718b5d9dc561936972468de76ddb7d7172aecaec2c4f0bf3ca987d2a87046220
|
@@ -13,6 +13,7 @@ module Fastlane
|
|
13
13
|
|
14
14
|
lizard_extra_args = params[:lizard_extra_args]
|
15
15
|
swiftlint_extra_args = params[:swiftlint_extra_args]
|
16
|
+
swiftlint_config_arg = swiftlint_config_path_arg(params)
|
16
17
|
|
17
18
|
swiftlint_path_args = self.swiftlint_path_args(params)
|
18
19
|
lizard_path_args = self.lizard_path_args(params)
|
@@ -39,7 +40,7 @@ module Fastlane
|
|
39
40
|
|
40
41
|
# run static code analysis
|
41
42
|
unless params[:skip_swiftlint_analysis]
|
42
|
-
sh("swiftlint lint #{swiftlint_path_args} --quiet > '#{swiftlint_output_path}' || exit 0")
|
43
|
+
sh("swiftlint lint #{swiftlint_path_args} #{swiftlint_config_arg} #{swiftlint_extra_args} --quiet > '#{swiftlint_output_path}' || exit 0")
|
43
44
|
end
|
44
45
|
|
45
46
|
unless params[:skip_lizard_analysis]
|
@@ -89,6 +90,28 @@ module Fastlane
|
|
89
90
|
include_files + exclude_files
|
90
91
|
end
|
91
92
|
|
93
|
+
def self.swiftlint_config_path_arg(params)
|
94
|
+
file_path = params[:swiftlint_config_path]
|
95
|
+
config_path_arg = ""
|
96
|
+
|
97
|
+
if File.exist?('.swiftlint.yml')
|
98
|
+
config_path_arg = File.expand_path('.swiftlint.yml')
|
99
|
+
end
|
100
|
+
|
101
|
+
if file_path != nil && !file_path.strip.empty?
|
102
|
+
config_path_arg = File.expand_path(file_path.strip)
|
103
|
+
if !File.exist?(config_path_arg)
|
104
|
+
config_path_arg = ""
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
if !config_path_arg.strip.empty?
|
109
|
+
return "--config '#{config_path_arg}'"
|
110
|
+
else
|
111
|
+
return ""
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
92
115
|
def self.swiftlint_path_args(params)
|
93
116
|
include_files = ""
|
94
117
|
|
@@ -135,6 +158,11 @@ module Fastlane
|
|
135
158
|
default_value: false,
|
136
159
|
optional: true),
|
137
160
|
|
161
|
+
FastlaneCore::ConfigItem.new(key: :swiftlint_config_path,
|
162
|
+
env_name: "FL_EN_SWIFTLINT_CONFIG_PATH",
|
163
|
+
description: 'Path to .swiftlint.yml',
|
164
|
+
optional: true),
|
165
|
+
|
138
166
|
FastlaneCore::ConfigItem.new(key: :swiftlint_extra_args,
|
139
167
|
env_name: "FL_EN_SWIFTLINT_EXTRA ARGS",
|
140
168
|
description: 'Extra command line args for swiftlint',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-ciutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolae Ghimbovschi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slather
|