pronto-golang 0.0.1 → 0.0.2
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 +7 -1
- data/lib/pronto/golang/version.rb +1 -1
- data/lib/pronto/golang.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7d71a95cfaeaa1716cc686e7e9971a21716ca9b
|
4
|
+
data.tar.gz: 488adfc26719f0b65786b7e2248f06b41abcb379
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4708f6ce4f4d21eebe6fc8bc112f7b3f67b40e389eff10e4045134eae6acf17571dd93de67bad6f9d62578efbd88422b0293b482562ca855afa5477b0779ff6b
|
7
|
+
data.tar.gz: 64d5dfceab088121881135694889b493728b15f5501808a61c293a2717695f0b96309f2e2eb93292e413235c8706f0176e65a677116337a7bef4259bb09eba87
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Pronto runner for Golang
|
2
2
|
|
3
|
+
[](https://travis-ci.org/Barzahlen/pronto-golang) [](http://rubydoc.info/github/Barzahlen/pronto-golang)
|
4
|
+
|
3
5
|
Pronto runner for [Golang](https://golang.org) tools
|
4
6
|
|
5
7
|
## Tools
|
@@ -38,4 +40,8 @@ It is expected that it reponds to the following methods:
|
|
38
40
|
| `command(file_path)` | Executes the command and receives the file_path to allow checking only the current file |
|
39
41
|
| `base_command` | Returns the name/basic command that will be invoked. Is also used for enabling and disabling it via `.golangtools.yml` |
|
40
42
|
| `installed?` | Returns true if the tool can be found, e.g. through `which #{base_command}` |
|
41
|
-
| `parse_line(line)` | Receives the line returned from the tool for parsing.
|
43
|
+
| `parse_line(line)` | Receives the line returned from the tool for parsing. Returns `absolute_path`, `line_number`, `level`, `message text` |
|
44
|
+
|
45
|
+
## License
|
46
|
+
|
47
|
+
[MIT](LICENSE)
|
data/lib/pronto/golang.rb
CHANGED
@@ -50,6 +50,8 @@ module Pronto
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def process_line(patch, tool, output_line)
|
53
|
+
return nil if output_line =~ /^#/
|
54
|
+
|
53
55
|
file_path, line_number, severity, message = tool.parse_line(output_line)
|
54
56
|
|
55
57
|
patch.added_lines.each do |line|
|
@@ -69,7 +71,7 @@ module Pronto
|
|
69
71
|
if @tools == nil
|
70
72
|
config = dotconfig
|
71
73
|
|
72
|
-
@tools = GolangTools.constants.map do |constant|
|
74
|
+
@tools = GolangTools.constants.sort.map do |constant|
|
73
75
|
tool = Object.const_get("Pronto::GolangTools::#{constant}").new
|
74
76
|
|
75
77
|
if tool.installed? &&
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-golang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|