gergich 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gergich/capture/tsc_capture.rb +27 -0
- data/lib/gergich/cli/gergich.rb +4 -1
- data/lib/gergich/cli/master_bouncer.rb +0 -1
- data/lib/gergich.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2ff8b509003882023b5a398aedac56d228be6ed8ef2fab2d44bcdf2f9335357
|
4
|
+
data.tar.gz: c61126201f209ae505400519a2607d06548bfd0cb66d05e2ad0e6be9df5ed5b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e88b3dd20d059ab7f28f205f0cea3a934453e4fe22ec6725a37c0534704c8f749801c0ad3d1943d1c5b9ac42e878ddd27ef56ef6382d64fcafa4b16fa714504
|
7
|
+
data.tar.gz: 9badb1a9cbf078cf58eb687677da65c6ef5cb5ac3c450056609f1e09de6d4deb6887304b22d8fe22dd955b0284fb0b015c6392e926f6eae4199e5edd96464ab3
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gergich
|
4
|
+
module Capture
|
5
|
+
class TscCapture < BaseCapture
|
6
|
+
def run(output)
|
7
|
+
pattern = /([^(\n]+)\((\d+),(\d+)\): (\w+) (\w+): (.*(\n .*)*)/
|
8
|
+
|
9
|
+
output.scan(pattern).map { |file, line, pos, severity, code, error|
|
10
|
+
{
|
11
|
+
path: file,
|
12
|
+
message: error,
|
13
|
+
source: "tsc",
|
14
|
+
rule: code,
|
15
|
+
position: {
|
16
|
+
start_line: line.to_i,
|
17
|
+
start_character: pos.to_i,
|
18
|
+
end_line: line.to_i,
|
19
|
+
end_character: pos.to_i
|
20
|
+
},
|
21
|
+
severity: severity
|
22
|
+
}
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/gergich/cli/gergich.rb
CHANGED
@@ -9,7 +9,9 @@ CI_TEST_ARGS = {
|
|
9
9
|
{ path: "foo.rb", position: 3, severity: "error", message: "ಠ_ಠ" },
|
10
10
|
{ path: "/COMMIT_MSG", position: 1, severity: "info", message: "cool story bro" },
|
11
11
|
{ path: "/COMMIT_MSG", severity: "info", message: "lol",
|
12
|
-
position: { start_line: 1, start_character: 1, end_line: 1, end_character: 2 } }
|
12
|
+
position: { start_line: 1, start_character: 1, end_line: 1, end_character: 2 } },
|
13
|
+
{ path: "/COMMIT_MSG", severity: "info", message: "more",
|
14
|
+
position: { start_line: 1, start_character: 5, end_line: 1, end_character: 5 } }
|
13
15
|
].to_json
|
14
16
|
],
|
15
17
|
"label" => ["Code-Review", 1],
|
@@ -210,6 +212,7 @@ commands["capture"] = {
|
|
210
212
|
* i18nliner
|
211
213
|
* flake8
|
212
214
|
* stylelint
|
215
|
+
* tsc
|
213
216
|
* yamllint
|
214
217
|
* custom:<path>:<class_name> - file path and ruby
|
215
218
|
class_name of a custom formatter.
|
data/lib/gergich.rb
CHANGED
@@ -459,7 +459,7 @@ module Gergich
|
|
459
459
|
(
|
460
460
|
position.is_a?(Integer) && position >= 0
|
461
461
|
) || (
|
462
|
-
position.is_a?(Hash) && position.keys.sort == POSITION_KEYS &&
|
462
|
+
position.is_a?(Hash) && position.keys.map(&:to_s).sort == POSITION_KEYS &&
|
463
463
|
position.values.all? { |v| v.is_a?(Integer) && v >= 0 }
|
464
464
|
)
|
465
465
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gergich
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Jensen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/gergich/capture/shellcheck_capture.rb
|
159
159
|
- lib/gergich/capture/stylelint_capture.rb
|
160
160
|
- lib/gergich/capture/swiftlint_capture.rb
|
161
|
+
- lib/gergich/capture/tsc_capture.rb
|
161
162
|
- lib/gergich/capture/yamllint_capture.rb
|
162
163
|
- lib/gergich/cli.rb
|
163
164
|
- lib/gergich/cli/gergich.rb
|
@@ -166,7 +167,7 @@ homepage: https://github.com/instructure/gergich
|
|
166
167
|
licenses:
|
167
168
|
- MIT
|
168
169
|
metadata: {}
|
169
|
-
post_install_message:
|
170
|
+
post_install_message:
|
170
171
|
rdoc_options: []
|
171
172
|
require_paths:
|
172
173
|
- lib
|
@@ -181,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
182
|
- !ruby/object:Gem::Version
|
182
183
|
version: '0'
|
183
184
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
185
|
-
signing_key:
|
185
|
+
rubygems_version: 3.1.6
|
186
|
+
signing_key:
|
186
187
|
specification_version: 4
|
187
188
|
summary: Command-line tool for adding Gerrit comments
|
188
189
|
test_files: []
|