pronto-golang 0.0.9 → 0.0.10

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
  SHA256:
3
- metadata.gz: 621be5f253b93a11e4e6da97c4786272ef23eae1c153e70a3b76d756d2c86c25
4
- data.tar.gz: 793b55d03f0579cd760ff0f40b2d0cecdb9c30b3bada3c111cd6a031ebb2cd7e
3
+ metadata.gz: 3cbee557f41f5ea0df6c206d3c5ead71a997c9bcf18de9d54cc3e89c4a071b5d
4
+ data.tar.gz: e16c15775e3936a95fa73dd2731e1d9445f3c84f286ef74e2e0911aa3e8a57c2
5
5
  SHA512:
6
- metadata.gz: '0191cd0e431ae8c3a022663408da5449e0b863b53e748bda9b87355110613c5cb665d12bb32e85d591153752468978e981ef1eeeb01a3742f5379f77371a9f50'
7
- data.tar.gz: 15203bf5b699f9eaf87ba1214e6de579d47e2d037c677ea9c04b06dfe6717075e49406dd0c7e97aec976349974f5991a758ac8eebea4e146c32d38069670f5f2
6
+ metadata.gz: e006272b386bed2b77e7957e5baea9dca13cd02f2bea3961ddd615522a4c0b5c1b3c2cac3a333b62e3762a344321c05c0feba6862d3b5108cced2874f2670bee
7
+ data.tar.gz: aed2d1c9a2da052369a6fa710924712bafbfef5ccebf846cfdc56f0c52375a72ab0e3901bca4c3871b27d4497ef909a659cde0b0189b80681677690ec9ffad06
@@ -14,11 +14,11 @@ module Pronto
14
14
  end
15
15
 
16
16
  def command(file_path)
17
- "#{base_command} #{parameters}"
17
+ "#{base_command} #{parameters} #{file_path}"
18
18
  end
19
19
 
20
20
  def parameters
21
- @config.fetch('parameters', './...') # Default to './...' if the key is not configured
21
+ @config.fetch('parameters', '') # Default to '' if the key is not configured
22
22
  end
23
23
 
24
24
  def available?
@@ -6,7 +6,12 @@ module Pronto
6
6
  end
7
7
 
8
8
  def parse_line(line)
9
- file_path, line_number, _, message = line.split(':')
9
+ path, line_number, _, message = line.split(':')
10
+
11
+ absolute_path = Pathname.new(path)
12
+ working_directory = Pathname.new(Dir.pwd)
13
+
14
+ file_path = absolute_path.relative_path_from(working_directory).to_s
10
15
 
11
16
  return file_path, line_number, :warning, message.to_s.strip
12
17
  end
@@ -9,6 +9,10 @@ module Pronto
9
9
  'gosec'
10
10
  end
11
11
 
12
+ def command(file_path)
13
+ "#{base_command} #{parameters} #{File.dirname(file_path)}"
14
+ end
15
+
12
16
  def parse_line(line)
13
17
  # Accepts lines of the following format:
14
18
  # [path_to_file:<line_number>] -
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module GolangVersion
3
- VERSION = '0.0.9'.freeze
3
+ VERSION = '0.0.10'.freeze
4
4
  end
5
5
  end
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schoknecht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -92,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubyforge_project:
96
- rubygems_version: 2.7.6
95
+ rubygems_version: 3.0.3
97
96
  signing_key:
98
97
  specification_version: 4
99
98
  summary: Pronto runner for golang tools