goodcheck 3.0.3 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +6 -6
- data/lib/goodcheck/reporters/text.rb +22 -5
- data/lib/goodcheck/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c52f33a7ac472299ab9acdfe418c10f14d7e36c1d709118484ed89bc4c336597
|
4
|
+
data.tar.gz: 9b2021e6127d5f4d5892ac248b04d612ee88d6efb2e0237d54e3e17a25b5ab67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb9085ae8573a2c07a29e7a75f0dd3f3b56340e1cde25ff10fb369c4eb4f1592f3101fc7bcb93a596d2a69fe3b69e0b4e2d35a81cbf65624fa4d471e7853e42e
|
7
|
+
data.tar.gz: 4eb596ffc6d63a26ef61b3b437b363eb517ff4d0923973b484b587ef39026475d927a408f9ab33c29eb72b207f072d844a12135a96dbd3040be9c5f73a8cf2d4
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## HEAD
|
4
4
|
|
5
|
+
## 3.1.0 (2021-07-15)
|
6
|
+
|
7
|
+
* Improve coloring for text format [#208](https://github.com/sider/goodcheck/pull/208)
|
8
|
+
* Output justification with text format [#210](https://github.com/sider/goodcheck/pull/210)
|
9
|
+
|
5
10
|
## 3.0.3 (2021-06-25)
|
6
11
|
|
7
12
|
* Fix HTTP GET retrying [#203](https://github.com/sider/goodcheck/pull/203)
|
data/README.md
CHANGED
@@ -37,12 +37,12 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
37
37
|
|
38
38
|
To release a new version, follows the steps below:
|
39
39
|
|
40
|
-
1. Update
|
41
|
-
2.
|
42
|
-
3.
|
43
|
-
4.
|
44
|
-
5. Run `bundle exec rake release`, which will create a
|
45
|
-
6.
|
40
|
+
1. Update [`lib/goodcheck/version.rb`](lib/goodcheck/version.rb).
|
41
|
+
2. Update [CHANGELOG.md](CHANGELOG.md).
|
42
|
+
3. Run `bundle exec rake docs:update_version`.
|
43
|
+
4. Run `git add . && git commit -m 'Version <new_version>'`.
|
44
|
+
5. Run `bundle exec rake release`, which will create a tag, push the commit and tag, and publish the gem to [RubyGems.org](https://rubygems.org).
|
45
|
+
6. Run `GIT_USER=<your_nickname> [USE_SSH=true] bundle exec rake docs:publish`.
|
46
46
|
|
47
47
|
## Contributing
|
48
48
|
|
@@ -25,7 +25,16 @@ module Goodcheck
|
|
25
25
|
def issue(issue)
|
26
26
|
@issue_count += 1
|
27
27
|
|
28
|
-
|
28
|
+
format_line = lambda do |line:, column:|
|
29
|
+
format_args = {
|
30
|
+
path: Rainbow(issue.path).cyan,
|
31
|
+
location: Rainbow(":#{line}:#{column}:").dimgray,
|
32
|
+
message: issue.rule.message.lines.first.chomp,
|
33
|
+
rule: Rainbow("(#{issue.rule.id})").dimgray,
|
34
|
+
severity: issue.rule.severity ? Rainbow("[#{issue.rule.severity}]").magenta : ""
|
35
|
+
}
|
36
|
+
format("%<path>s%<location>s %<message>s %<rule>s %<severity>s", format_args).strip
|
37
|
+
end
|
29
38
|
|
30
39
|
if issue.location
|
31
40
|
start_line = issue.location.start_line
|
@@ -37,13 +46,21 @@ module Goodcheck
|
|
37
46
|
else
|
38
47
|
line.bytesize - start_column
|
39
48
|
end
|
40
|
-
|
41
|
-
severity = issue.rule.severity ? Rainbow("[#{issue.rule.severity}]").magenta : ""
|
42
|
-
stdout.puts "#{Rainbow(issue.path).cyan}:#{start_line}:#{start_column}: #{message} #{rule} #{severity}".strip
|
49
|
+
stdout.puts format_line.call(line: start_line, column: start_column)
|
43
50
|
stdout.puts line.chomp
|
44
51
|
stdout.puts (" " * start_column_index) + Rainbow("^" + "~" * (column_size - 1)).yellow
|
45
52
|
else
|
46
|
-
stdout.puts
|
53
|
+
stdout.puts format_line.call(line: "-", column: "-")
|
54
|
+
end
|
55
|
+
|
56
|
+
justifications = issue.rule.justifications
|
57
|
+
unless justifications.empty?
|
58
|
+
stdout.puts ""
|
59
|
+
stdout.puts " #{Rainbow('Justifications').dimgray.underline.italic}:"
|
60
|
+
justifications.each do |justification|
|
61
|
+
stdout.puts " • #{Rainbow(justification).dimgray.italic}"
|
62
|
+
end
|
63
|
+
stdout.puts ""
|
47
64
|
end
|
48
65
|
end
|
49
66
|
|
data/lib/goodcheck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goodcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sider Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
|
-
rubygems_version: 3.2.
|
212
|
+
rubygems_version: 3.2.23
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: Regexp based customizable linter.
|