danger-shiphawk-plugin 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/danger_plugin.rb +4 -3
- data/lib/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcc0847f4844f1da75335311fa0ee2b5d3a7f465573084d92b6f73b8ab68ad9f
|
4
|
+
data.tar.gz: 92aba600565c9a11c3c13e52a56d79c09b34a888192a8f297c73230bcd3d1b91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a55d064dad0a1ded2bfe8cc4060c8c105591081ab437444e38877a06dd9c5ff8ffd02328d1ff19b85fda871099482ca880659f2ef11bdf26eef6bceb3585be
|
7
|
+
data.tar.gz: 708c4380c7741c99b3094532a9bda3892e3571e61ee9260268aa005198e43af40395dae1913762b4e2a1b1b606dda9cd4c6a1c1ae2bccb33e0c3958dc514b2a0
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ The following keys are supported:
|
|
22
22
|
* `files: 'all'` ('all' | 'diff') Files to lint
|
23
23
|
* `config: nil` Path to the config `.rubocop.yml` file
|
24
24
|
* `limit_of_warnings: 10` (Number) Count of offenses that should be displayed
|
25
|
-
* `
|
25
|
+
* `autofix_hint_threshold: 0` (Number) Rubocop auto-fix message will appear when errors count more then this number
|
26
26
|
|
27
27
|
## License:
|
28
28
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -33,5 +33,5 @@ Then create new version of a gem:
|
|
33
33
|
|
34
34
|
```
|
35
35
|
gem build danger-shiphawk-plugin.gemspec
|
36
|
-
gem push danger-shiphawk-plugin-
|
36
|
+
gem push danger-shiphawk-plugin-1.0.4.gem
|
37
37
|
```
|
data/lib/danger_plugin.rb
CHANGED
@@ -24,7 +24,7 @@ module Danger
|
|
24
24
|
@files = options.fetch(:files, 'all')
|
25
25
|
@config = options.fetch(:config, nil)
|
26
26
|
@limit_of_warnings = options.fetch(:limit_of_warnings, 10)
|
27
|
-
@
|
27
|
+
@autofix_hint_threshold = options.fetch(:autofix_hint_threshold, 0)
|
28
28
|
|
29
29
|
return if offenses.empty?
|
30
30
|
|
@@ -62,7 +62,8 @@ module Danger
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def rubocop
|
65
|
-
command = ['
|
65
|
+
command = ['bundle', 'exec']
|
66
|
+
command += ['rubocop']
|
66
67
|
command += ['--format', 'json']
|
67
68
|
command += ['--config', @config.shellescape] if @config
|
68
69
|
|
@@ -84,7 +85,7 @@ module Danger
|
|
84
85
|
|
85
86
|
def message_autofix
|
86
87
|
return if offenses.empty?
|
87
|
-
return if offenses.size
|
88
|
+
return if @autofix_hint_threshold > offenses.size
|
88
89
|
|
89
90
|
msg = '## Please fix rubocop mistakes: `rubocop --auto-correct`'
|
90
91
|
print_message(msg, :fail)
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-shiphawk-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShipHawk Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: rubocop
|
28
|
+
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|