fastlane-plugin-clang_analyzer 0.1.0 → 0.1.1

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: 23cd4c363b1add101178e72e6ab8668d5cc1b0f7
4
- data.tar.gz: b9c2ed5a93a176d234ba38f081eef48197fb8bd3
3
+ metadata.gz: aa078c76e97cf14daaa03f8d28ab5d61de0ad4f6
4
+ data.tar.gz: a2dc61d50ea47b3eae6981606b6b5856d1b7362a
5
5
  SHA512:
6
- metadata.gz: dce28c4c3a07880be4b5701f358bd903419dd80c5c6f950e674f80689b845531eed37d144adffbfe18f74a3d7454732afbaccc607f3e202e62424d229bdf198a
7
- data.tar.gz: 3731b6bc75ea0fb85d3f46fc41cb527086edffc296f82012849b0539a1e48a410a1d6690819dbf7a34ff677cabb45eb68b6cbafba8785967a154b1df85922a84
6
+ metadata.gz: 7c9646ede3f62e2bbbe259680db814f93c971feefbac38be27af3210478b775e4134676723c4c66e09851b9898374ada6dcc4c27ee97c4a2af3d182edd1531e8
7
+ data.tar.gz: dec247beab13a5221d7dff1060488db31820c5e3075b1db3fa2f207f08a002ead9ce512f79a9a1db07ffb0d02c235d7ab30854c29b73219c7bc5457624d4ea9c
data/README.md CHANGED
@@ -17,7 +17,7 @@ To run Clang Static Analyzer add `clang_analyzer` action call in one of lanes in
17
17
 
18
18
  ## About clang_analyzer
19
19
 
20
- Runs Clang Static Analyzer(http://clang-analyzer.llvm.org/) and generates report.
20
+ Runs [Clang Static Analyzer](http://clang-analyzer.llvm.org/) on your codebase and generates analysis report.
21
21
 
22
22
  ## Example
23
23
 
@@ -34,7 +34,7 @@ clang_analyzer(
34
34
  configuration: 'Debug', # optional
35
35
  sdk: 'iphonesimulator', # optional
36
36
  arch: 'i386', # optional
37
- report_output_path: './fastlane/analyze_report/', # optional
37
+ report_output_path: './fastlane/analyze_report/' # optional
38
38
  )
39
39
  ```
40
40
 
@@ -30,18 +30,25 @@ module Fastlane
30
30
  analyzer_params_string = analyzer_params.join(" ")
31
31
 
32
32
  begin
33
- output = Actions.sh(File.join(params[:analyzer_path], "scan-build") + " xcodebuild #{analyzer_params_string} clean analyze")
34
-
35
33
  resulting_path = params[:report_output_path]
36
- begin
37
- FileUtils.rm_rf(resulting_path)
38
- rescue
39
- nil
40
- end
34
+ FileUtils.rm_rf(resulting_path)
35
+
36
+ log_file_path = params[:log_file_path]
37
+ clean = params[:clean] ? "clean" : ""
38
+ command = File.join(params[:analyzer_path], "scan-build") + " xcodebuild #{analyzer_params_string} #{clean} analyze | tee #{log_file_path} | xcpretty"
41
39
 
40
+ FastlaneCore::CommandExecutor.execute(command: command,
41
+ print_all: true,
42
+ print_command: true,
43
+ error: proc do |output|
44
+ ErrorHandler.handle_build_error(output)
45
+ end)
46
+
47
+ output = File.read(log_file_path)
42
48
  matches = output.match(/scan-view (.*)\'/)
43
49
  if matches
44
50
  path = output.match(/scan-view (.*)\'/)[1]
51
+ FileUtils.mkdir_p(resulting_path)
45
52
  FileUtils.cp_r(path, resulting_path)
46
53
  UI.success "Successfully generated analyzer report at path #{File.expand_path(resulting_path)}"
47
54
  else
@@ -97,15 +104,23 @@ module Fastlane
97
104
  env_name: "CLANG_ANALYZER_ARCH",
98
105
  optional: true,
99
106
  default_value: "i386"),
107
+ FastlaneCore::ConfigItem.new(key: :clean,
108
+ env_name: "CLANG_ANALYZER_CLEAN",
109
+ optional: true,
110
+ default_value: true),
111
+ FastlaneCore::ConfigItem.new(key: :log_file_path,
112
+ env_name: "CLANG_ANALYZER_LOG_FILE_PATH",
113
+ optional: true,
114
+ default_value: "clang-analyzer.log"),
100
115
  FastlaneCore::ConfigItem.new(key: :report_output_path,
101
116
  env_name: "CLANG_ANALYZER_REPORT_OUTPUT_PATH",
102
117
  optional: true,
103
- default_value: "./fastlane/analyze_report/")
118
+ default_value: "analyzer_report")
104
119
 
105
120
  ]
106
121
  end
107
122
 
108
- def self.is_supported?(platform)
123
+ def self.is_supported?(_platform)
109
124
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
110
125
  # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
111
126
  #
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ClangAnalyzer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,97 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-clang_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siarhei Fiedartsou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-24 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: xcpretty
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: fastlane
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - '>='
88
102
  - !ruby/object:Gem::Version
89
103
  version: 1.104.0
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - '>='
95
109
  - !ruby/object:Gem::Version
96
110
  version: 1.104.0
97
111
  description:
@@ -100,12 +114,12 @@ executables: []
100
114
  extensions: []
101
115
  extra_rdoc_files: []
102
116
  files:
103
- - LICENSE
104
- - README.md
105
- - lib/fastlane/plugin/clang_analyzer.rb
106
117
  - lib/fastlane/plugin/clang_analyzer/actions/clang_analyzer_action.rb
107
118
  - lib/fastlane/plugin/clang_analyzer/helper/clang_analyzer_helper.rb
108
119
  - lib/fastlane/plugin/clang_analyzer/version.rb
120
+ - lib/fastlane/plugin/clang_analyzer.rb
121
+ - README.md
122
+ - LICENSE
109
123
  homepage: https://github.com/SiarheiFedartsou/fastlane-plugin-clang_analyzer
110
124
  licenses:
111
125
  - MIT
@@ -116,17 +130,17 @@ require_paths:
116
130
  - lib
117
131
  required_ruby_version: !ruby/object:Gem::Requirement
118
132
  requirements:
119
- - - ">="
133
+ - - '>='
120
134
  - !ruby/object:Gem::Version
121
135
  version: '0'
122
136
  required_rubygems_version: !ruby/object:Gem::Requirement
123
137
  requirements:
124
- - - ">="
138
+ - - '>='
125
139
  - !ruby/object:Gem::Version
126
140
  version: '0'
127
141
  requirements: []
128
142
  rubyforge_project:
129
- rubygems_version: 2.6.4
143
+ rubygems_version: 2.0.14.1
130
144
  signing_key:
131
145
  specification_version: 4
132
146
  summary: Runs Clang Static Analyzer(http://clang-analyzer.llvm.org/) and generates