danger-shiphawk-plugin 1.0.2 → 1.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 956b926da7b191ddf6269153898a4125749e820543a3db8c612b4adbdeea0fe7
4
- data.tar.gz: 1c8c91391a63e964e5fd0feb5880fcb5f4b89d43abc41ec0ce90ac5688519d0c
3
+ metadata.gz: dafe4c5d9560719d11c95a53c6a983a0d74c0d1f42e1c7b06a3f0cd5242dec99
4
+ data.tar.gz: c323d1e31cae4992c1e58d0e4245e3b2c121e1b02bb123e2dca49b0b30d8b34e
5
5
  SHA512:
6
- metadata.gz: 767995b6772dc77638e159abca5bad83b19375e7ad08d8ec32a81739593b87440ae884d2f33afab94163a08e4b32c75281cce7bae7bf1a7edfb67a0bdbf2e699
7
- data.tar.gz: f3ce9e204381b432fd335300fe9da858d92a90106dc94fbc553f7e1639dca96c1a17871039d01f8353592459e7e35c4dc399f4b7d9d89e50396d1d9d53136713
6
+ metadata.gz: bf084e68f6f1971d055aee342dfad40c36f9eab930a9c6e8de2a268519395396ac7f6cddceb1fc8b709d1dc594a35b6c28e186323476cc1fba75a934c76a1104
7
+ data.tar.gz: ea70f9da7ed3fe6f3d5630473dcbecbc515a7a7373307bc5abd9cb291729f109b9b22681dc53dfd1587a002f7c58e51a97e5244aff7ca38675f32abab270627d
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
- * `autofix_count: 30` (Number) Rubocop auto-fix will appear when errors count less then this number
25
+ * `autofix_hint_threshold: 50` (Number) Rubocop auto-fix message will appear when errors count less 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,4 +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-1.0.6.gem
36
37
  ```
@@ -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
- @autofix_count = options.fetch(:autofix_count, 30)
27
+ @autofix_hint_threshold = options.fetch(:autofix_hint_threshold, 50)
28
28
 
29
29
  return if offenses.empty?
30
30
 
@@ -62,9 +62,11 @@ module Danger
62
62
  end
63
63
 
64
64
  def rubocop
65
- command = ['rubocop']
66
- command << ['--format', 'json']
67
- command << ['--config', @config.shellescape] if @config
65
+ command = ['bundle', 'exec']
66
+ command += ['rubocop']
67
+ command += ['--force-exclusion']
68
+ command += ['--format', 'json']
69
+ command += ['--config', @config.shellescape] if @config
68
70
 
69
71
  `#{command.join(' ')} #{files_to_lint}`
70
72
  end
@@ -84,7 +86,7 @@ module Danger
84
86
 
85
87
  def message_autofix
86
88
  return if offenses.empty?
87
- return if offenses.size > @autofix_count
89
+ return if offenses.size > @autofix_hint_threshold
88
90
 
89
91
  msg = '## Please fix rubocop mistakes: `rubocop --auto-correct`'
90
92
  print_message(msg, :fail)
@@ -95,11 +97,11 @@ module Danger
95
97
 
96
98
  wide_report_offenses.each do |offense|
97
99
  msg = []
98
- msg << '## Syntax error detected:' if offense.serenity == :fail
100
+ msg << "## Syntax error detected:" if offense.serenity == :fail
99
101
  msg << offense.path
100
102
  msg << offense.message
101
103
 
102
- print_message(msg.join('\n'), offense.serenity)
104
+ print_message(msg.join(" \n "), offense.serenity)
103
105
  end
104
106
  end
105
107
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Danger
4
4
  module ShipHawkPlugin
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.8'
6
6
  end
7
7
  end
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.2
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShipHawk Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-23 00:00:00.000000000 Z
11
+ date: 2020-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger
@@ -122,7 +122,7 @@ homepage: https://github.com/Shiphawk/danger-shiphawk-plugin
122
122
  licenses:
123
123
  - MIT
124
124
  metadata: {}
125
- post_install_message:
125
+ post_install_message:
126
126
  rdoc_options: []
127
127
  require_paths:
128
128
  - lib
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubygems_version: 3.0.6
141
- signing_key:
141
+ signing_key:
142
142
  specification_version: 4
143
143
  summary: A Danger plugin for running Ruby files through Rubocop.
144
144
  test_files: []