danger-go 0.0.4 → 0.0.5
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/.rubocop.yml +3 -0
- data/.yardoc/checksums +1 -1
- data/.yardoc/objects/root.dat +0 -0
- data/lib/golint/gem_version.rb +1 -1
- data/lib/golint/plugin.rb +1 -1
- data/spec/golint_spec.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04ecbb45e6d5ddc73ef12dcc900f09b99e290d38
|
4
|
+
data.tar.gz: 6822c6bcea671b6703ab043fd9de8802cd2497e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f3213c5383f5d512e451a2ed2526141050efe6b200b9f6db79867963b83c5557371487d28aa4c2519a6d51997d7a6879355738f6c5b615b7475f9fe6bcc1895
|
7
|
+
data.tar.gz: 1583a96da1d1088bd9fa29410c1c16211e094f027952cb89731c5ba88d460f6bf37b436b84139d17d8a7b82f28ce94e7fb0797f9910262705f54669422fa210b
|
data/.rubocop.yml
CHANGED
data/.yardoc/checksums
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/Users/user/Desktop/danger-go/lib/danger_golint.rb e829c86e3321bf181656d19e46f386ca1fa9d2e6
|
2
2
|
/Users/user/Desktop/danger-go/lib/danger_plugin.rb 91e59d5cc142d21c5e68e0be029e0879a93bb5f4
|
3
3
|
/Users/user/Desktop/danger-go/lib/golint/gem_version.rb effd4426e6978b8446fa3cf47aa4e056ff6a2361
|
4
|
-
/Users/user/Desktop/danger-go/lib/golint/plugin.rb
|
4
|
+
/Users/user/Desktop/danger-go/lib/golint/plugin.rb 096e6cba0da5bdf559d14738183d0d06f9257047
|
data/.yardoc/objects/root.dat
CHANGED
Binary file
|
data/lib/golint/gem_version.rb
CHANGED
data/lib/golint/plugin.rb
CHANGED
data/spec/golint_spec.rb
CHANGED
@@ -48,20 +48,25 @@ module Danger
|
|
48
48
|
|
49
49
|
context 'when running on github' do
|
50
50
|
it 'handles a lint with errors count greater than threshold' do
|
51
|
-
lint_report =
|
51
|
+
lint_report = "test.go:213:3: don't use underscores in Go names; var my_var should be myVar\n" \
|
52
|
+
"test.go:217:3: var testUrl should be testUrl\n"
|
52
53
|
|
53
54
|
allow(@golint).to receive(:`).with('golint .').and_return(lint_report)
|
54
55
|
allow(@dangerfile.danger).to receive(:scm_provider).and_return('github')
|
55
56
|
allow(@dangerfile.github).to receive(:html_link)
|
56
57
|
.with('test.go#L213', full_path: false)
|
57
58
|
.and_return('fake_link_to:test.go#L213')
|
59
|
+
allow(@dangerfile.github).to receive(:html_link)
|
60
|
+
.with('test.go#L217', full_path: false)
|
61
|
+
.and_return('fake_link_to:test.go#L217')
|
58
62
|
|
59
63
|
@golint.lint
|
60
64
|
|
61
65
|
markdown = @golint.status_report[:markdowns].first
|
62
66
|
expect(markdown.message).to include('## DangerGo found issues')
|
63
|
-
expect(markdown.message).to include(
|
64
|
-
|
67
|
+
expect(markdown.message).to include("| fake_link_to:test.go#L213 | 213 | 3 | " \
|
68
|
+
"don`t use underscores in Go names; var my_var should be myVar |\n" \
|
69
|
+
"| fake_link_to:test.go#L217 | 217 | 3 | var testUrl should be testUrl |")
|
65
70
|
end
|
66
71
|
end
|
67
72
|
end
|