pronto-golang 0.0.1 → 0.0.2

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: 85e017e9fa5d4b0b5ac4ae463c6e0a7bfe18e1c6
4
- data.tar.gz: 670a418d1c9090b2baed18a9a365a55d4677d941
3
+ metadata.gz: d7d71a95cfaeaa1716cc686e7e9971a21716ca9b
4
+ data.tar.gz: 488adfc26719f0b65786b7e2248f06b41abcb379
5
5
  SHA512:
6
- metadata.gz: 2490baa9b58080974e677abe5f5ce152442c04b86b2cfaa416f75d5fff81c4e912e201526b92530c64f36f0a58b74fa5f4dbc719cca7848a74b61879fc848ef6
7
- data.tar.gz: 2ffaaeed2fa0806eb2fb943b61dcac3855519236b4a3a33301f965adb3aa60149b8d2fc45c1b1a3643574bb408eba070f85becd06fac2484b81ae924aaf929f7
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
+ [![Build Status](https://travis-ci.org/Barzahlen/pronto-golang.svg?branch=master)](https://travis-ci.org/Barzahlen/pronto-golang) [![RubyDoc](https://img.shields.io/badge/ruby-doc-green.svg)](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. REturns `absolute_path`, `line_number`, `level`, `message text` |
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)
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module GolangVersion
3
- VERSION = '0.0.1'.freeze
3
+ VERSION = '0.0.2'.freeze
4
4
  end
5
5
  end
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.1
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-01-22 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto