pronto-golang 0.0.20 → 0.0.21
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 +4 -4
- data/README.md +4 -0
- data/lib/pronto/golang/version.rb +1 -1
- data/lib/pronto/golang.rb +4 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 612639f71be954f736e69c65bf490be41827ea5ab1887322883a7b5393eb2b0b
|
|
4
|
+
data.tar.gz: 3e685923dbad1df2419a7ba69d98c50e1b3b8c186a8d43f324504ce55c9c510f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2f06b0f257ac31dec2de91d6652a829f7641e0733b293e41465f9b449e574492a55fb521a407e86d37d32cd8ce512f31fed85c4bcf0b69be07a71fa2dd2c2ca
|
|
7
|
+
data.tar.gz: aa82831d47d9672ba8c2c4d0beb9d3b0fd66719cc85c99cb066a9f90336a5ca086f1d7ffcdc24e50e0bbe5cca037f581c39490780bcd3e5b013f7af6ff350e59
|
data/README.md
CHANGED
|
@@ -49,6 +49,10 @@ It is expected that it reponds to the following methods:
|
|
|
49
49
|
|
|
50
50
|
It is possible to inherit from `Pronto::GolangTools::Base`, in which case only `self.base_command` and `parse_line` need to be implemented.
|
|
51
51
|
|
|
52
|
+
## Debugging tool output
|
|
53
|
+
|
|
54
|
+
In order to debug the configured tool output and parsing, it is possible to run pronto with the `PRONTO_GOLANG_DEBUG` environment variable set to `true`, e.g. `PRONTO_GOLANG_DEBUG=true pronto run`. This will print the output of the tool and the parsed messages to the console.
|
|
55
|
+
|
|
52
56
|
## License
|
|
53
57
|
|
|
54
58
|
[MIT](LICENSE)
|
data/lib/pronto/golang.rb
CHANGED
|
@@ -80,6 +80,10 @@ module Pronto
|
|
|
80
80
|
Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
|
|
81
81
|
[stdout, stderr].each do |result_text|
|
|
82
82
|
while output_line = result_text.gets
|
|
83
|
+
if ENV['PRONTO_GOLANG_DEBUG'] == 'true'
|
|
84
|
+
$stderr.puts "Tool: #{tool.base_command} - Output: #{output_line}"
|
|
85
|
+
end
|
|
86
|
+
|
|
83
87
|
next if output_line.strip == 'exit status 1'
|
|
84
88
|
|
|
85
89
|
collected_findings << {
|
|
@@ -88,13 +92,6 @@ module Pronto
|
|
|
88
92
|
}
|
|
89
93
|
end
|
|
90
94
|
end
|
|
91
|
-
|
|
92
|
-
while output_line = stderr.gets
|
|
93
|
-
collected_findings << {
|
|
94
|
-
output: output_line,
|
|
95
|
-
tool: tool,
|
|
96
|
-
}
|
|
97
|
-
end
|
|
98
95
|
end
|
|
99
96
|
|
|
100
97
|
return collected_findings
|