fastlane-plugin-lizard 1.1.1 → 1.3.3
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: f11d60a24d18b1b62af0f669c68ddea4fdb1cbdc7c615bce60a29a4ee6b9d91c
|
4
|
+
data.tar.gz: 91e5c39f90fcc1d417adc41f431cec29ae77a8f91f101ac05b66451bcbdfa0e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b25050341b800b0e3bebc9b3b087e7a9d4e7af36460a68910fcdf410f24adaa3908ae8858c366f5fa558bbd8ca48e1c5c1cd179280b38e1563610686cf9550a
|
7
|
+
data.tar.gz: 6e721b7cdb510f91ade9a171ba12a56e434c96f4206f3b8b4046ef6200337fa257cf25bf86cc83c31b39bd20abdc8397713af3ad7caf51175a2d9aef118995fb
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2017 Moses Liao <moses.liao.sd@gmail.com>
|
3
|
+
Copyright (c) 2017-2019 Moses Liao <moses.liao.sd@gmail.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
[![Gem Version][3]][4]
|
5
5
|
[![CircleCI][5]][6]
|
6
6
|
[![codecov][7]][8]
|
7
|
+
[![Maintainability][16]][17]
|
7
8
|
|
8
9
|
## Getting Started
|
9
10
|
|
@@ -44,6 +45,12 @@ lizard(
|
|
44
45
|
language: 'swift,objectivec'
|
45
46
|
```
|
46
47
|
|
48
|
+
#### Multiple excludes
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
exclude: 'spec_helper.rb,fixtures/*'
|
52
|
+
```
|
53
|
+
|
47
54
|
#### XML reports
|
48
55
|
|
49
56
|
```ruby
|
@@ -93,3 +100,5 @@ iOS and Android apps. To learn more, check out [fastlane.tools][14].
|
|
93
100
|
[13]: https://docs.fastlane.tools/plugins/create-plugin/
|
94
101
|
[14]: https://fastlane.tools
|
95
102
|
[15]: https://github.com/Backelite/sonar-swift
|
103
|
+
[16]: https://api.codeclimate.com/v1/badges/c241884a5177ca46c672/maintainability
|
104
|
+
[17]: https://codeclimate.com/github/liaogz82/fastlane-plugin-lizard/maintainability
|
@@ -6,8 +6,12 @@ module Fastlane
|
|
6
6
|
UI.user_error!("You have to install lizard using `[sudo] pip install lizard` or specify the executable path with the `:executable` option.")
|
7
7
|
end
|
8
8
|
|
9
|
-
if params[:executable]
|
10
|
-
|
9
|
+
if params[:executable]
|
10
|
+
if !File.exist?(params[:executable])
|
11
|
+
UI.user_error!("The custom executable at '#{params[:executable]}' does not exist.")
|
12
|
+
elsif !File.file?(params[:executable])
|
13
|
+
UI.user_error!("You need to point to the executable to lizard.py file!")
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
lizard_command = params[:executable].nil? ? "lizard" : "python #{params[:executable]}"
|
@@ -18,14 +22,11 @@ module Fastlane
|
|
18
22
|
UI.user_error!("Your lizard version #{lizard_cli_version} is outdated, please upgrade to at least version #{required_version} and start your lane again!")
|
19
23
|
end
|
20
24
|
|
21
|
-
command = forming_command(lizard_command, params)
|
22
|
-
|
23
|
-
if params[:show_warnings]
|
24
|
-
Fastlane::Actions.sh_control_output("#{lizard_command} #{params[:source_folder]} | sed -n -e '/^$/,$p'", print_command: true, print_command_output: true)
|
25
|
-
end
|
25
|
+
command = forming_command(lizard_command, params).join(" ")
|
26
|
+
UI.message command
|
26
27
|
|
27
28
|
begin
|
28
|
-
Actions.sh(command
|
29
|
+
Actions.sh(command, log: false)
|
29
30
|
rescue StandardError => e
|
30
31
|
puts e
|
31
32
|
handle_lizard_error(params[:ignore_exit_status], $CHILD_STATUS.exitstatus)
|
@@ -41,7 +42,7 @@ module Fastlane
|
|
41
42
|
command << "-L #{params[:length]}" if params[:length]
|
42
43
|
command << "-a #{params[:arguments]}" if params[:arguments]
|
43
44
|
command << "-i #{params[:number]}" if params[:number]
|
44
|
-
command << "-x #{
|
45
|
+
command << params[:exclude].split(",").map { |x| "-x \"#{x.strip}\"" }.join(" ").to_s if params[:exclude]
|
45
46
|
command << "-t #{params[:working_threads]}" if params[:working_threads]
|
46
47
|
command << "-E #{params[:extensions]}" if params[:extensions]
|
47
48
|
command << "-s #{params[:sorting]}" if params[:sorting]
|
@@ -114,50 +115,48 @@ module Fastlane
|
|
114
115
|
description: "Limit for number of parameters",
|
115
116
|
optional: true),
|
116
117
|
FastlaneCore::ConfigItem.new(key: :number,
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
env_name: "FL_LIZARD_NUMBER",
|
119
|
+
description: "If the number of warnings is equal or less than the number, the tool will exit normally, otherwise it will generate error. Useful in makefile for legacy code",
|
120
|
+
is_string: false,
|
121
|
+
optional: true),
|
121
122
|
FastlaneCore::ConfigItem.new(key: :exclude,
|
122
|
-
|
123
|
-
|
124
|
-
|
123
|
+
env_name: "FL_LIZARD_EXCLUDE",
|
124
|
+
description: "Exclude files that match this pattern. * matches everything, ? matches any single character, \"./folder/*\" exclude everything in the folder recursively. Multiple patterns can be specified. Don't forget to add \"\" around the pattern",
|
125
|
+
is_string: true,
|
126
|
+
optional: true),
|
125
127
|
FastlaneCore::ConfigItem.new(key: :working_threads,
|
126
128
|
env_name: "FL_LIZARD_WORKING_THREADS",
|
127
129
|
description: "Number of working threads. A bigger number can fully utilize the CPU and faster",
|
128
130
|
optional: true,
|
129
131
|
is_string: false),
|
130
132
|
FastlaneCore::ConfigItem.new(key: :extensions,
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
133
|
+
env_name: "FL_LIZARD_EXTENSIONS",
|
134
|
+
description: "User the extensions. The available extensions are: -Ecpre: it will ignore code in the #else branch. -Ewordcount: count word frequencies and generate tag cloud. -Eoutside: include the global code as one function",
|
135
|
+
is_string: true,
|
136
|
+
optional: true),
|
135
137
|
FastlaneCore::ConfigItem.new(key: :sorting,
|
136
|
-
|
137
|
-
|
138
|
-
|
138
|
+
env_name: "FL_LIZARD_SORTING",
|
139
|
+
description: "Sort the warning with field. The field can be nloc, cyclomatic_complexity, token_count, parameter_count, etc. Or an customized file",
|
140
|
+
optional: true),
|
139
141
|
FastlaneCore::ConfigItem.new(key: :whitelist,
|
140
|
-
|
141
|
-
|
142
|
-
|
142
|
+
env_name: "FL_LIZARD_WHITELIST",
|
143
|
+
description: "The path and file name to the whitelist file",
|
144
|
+
optional: true),
|
143
145
|
FastlaneCore::ConfigItem.new(key: :report_file,
|
144
146
|
env_name: "FL_LIZARD_REPORT_FILE",
|
145
147
|
description: "The folder/file which lizard output to",
|
146
148
|
optional: true),
|
147
149
|
FastlaneCore::ConfigItem.new(key: :ignore_exit_status,
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
env_name: "FL_LIZARD_SHOW_WARNINGS",
|
154
|
-
description: "Show lizard warnings on console, on code that is too complex",
|
155
|
-
is_string: false,
|
156
|
-
default_value: false),
|
150
|
+
env_name: "FL_LIZARD_IGNORE_EXIT_STATUS",
|
151
|
+
description: "Ignore the exit status of the lizard command, so that serious violations don't fail the build (true/false)",
|
152
|
+
default_value: false,
|
153
|
+
is_string: false,
|
154
|
+
optional: true),
|
157
155
|
FastlaneCore::ConfigItem.new(key: :executable,
|
158
|
-
|
159
|
-
|
160
|
-
|
156
|
+
env_name: "FL_LIZARD_EXECUTABLE",
|
157
|
+
description: "Path to the `lizard.py` executable on your machine",
|
158
|
+
is_string: true,
|
159
|
+
optional: true)
|
161
160
|
]
|
162
161
|
end
|
163
162
|
|
@@ -4,9 +4,9 @@ module Fastlane
|
|
4
4
|
# class methods that you define here become available in your action
|
5
5
|
# as `Helper::LizardHelper.your_method`
|
6
6
|
#
|
7
|
-
def self.show_message
|
8
|
-
|
9
|
-
end
|
7
|
+
# def self.show_message
|
8
|
+
# UI.message("Hello from the lizard plugin helper!")
|
9
|
+
# end
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-lizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moses Liao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|