danger-rubocop 0.9.1 → 0.9.2
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 -1
- data/lib/version.rb +1 -1
- data/spec/danger_plugin_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8b4d92dd5ddd493b1d27553041631f01e18d822778ff653d6efbede8c9df7b9
|
4
|
+
data.tar.gz: d925de6ae7e157a46ebdaa8194666d1bc0347f8c6c5fd964dd910b5a9151d934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52c59f565ea64473fccfb198c570949a781f54c34bb063f6db0627133ce83d4e928990d93c7d5dc53e8a9936f7c50e5ab5f7d2c3a06577cc07a53d3a073753a3
|
7
|
+
data.tar.gz: ffb3de2dbead86c8a1fd98974cac247c96dcc639e6d510cd3c377ada6fca2857246664e6e4a41e4728ddf0f7e06449611abd7377b65572328269291269eddea7
|
data/README.md
CHANGED
@@ -46,10 +46,10 @@ Runs Ruby files through Rubocop. Generates a `markdown` list of warnings.
|
|
46
46
|
This method accepts a configuration hash.
|
47
47
|
The following keys are supported:
|
48
48
|
|
49
|
-
* `files`: array of file names or glob patterns to determine files to lint
|
49
|
+
* `files`: array of file names or glob patterns to determine files to lint. If omitted, this will lint only the files changed in the pull request. To lint all files every time, pass an empty string; this is the equivalent of typing `rubocop` without specifying any files, and will follow the rules in your `.rubocop.yml`.
|
50
50
|
* `force_exclusion`: pass `true` to pass `--force-exclusion` argument to Rubocop.
|
51
51
|
(this option will instruct rubocop to ignore the files that your rubocop config ignores,
|
52
|
-
despite the plugin providing the list of files
|
52
|
+
despite the plugin providing the list of files explicitly)
|
53
53
|
* `inline_comment`: pass `true` to comment inline of the diffs.
|
54
54
|
* `fail_on_inline_comment`: pass `true` to use `fail` instead of `warn` on inline comment.
|
55
55
|
* `report_danger`: pass true to report errors to Danger, and break CI.
|
data/lib/danger_plugin.rb
CHANGED
data/lib/version.rb
CHANGED
data/spec/danger_plugin_spec.rb
CHANGED
@@ -127,6 +127,16 @@ module Danger
|
|
127
127
|
expect(@rubocop.send(:added_lines, 'SAMPLE')).to eq([1])
|
128
128
|
end
|
129
129
|
end
|
130
|
+
|
131
|
+
context 'no such file' do
|
132
|
+
before do
|
133
|
+
allow(@rubocop.git).to receive(:diff_for_file).with('SAMPLE').and_return(nil)
|
134
|
+
end
|
135
|
+
|
136
|
+
it 'return empty array' do
|
137
|
+
expect(@rubocop.send(:added_lines, 'SAMPLE')).to eq([])
|
138
|
+
end
|
139
|
+
end
|
130
140
|
end
|
131
141
|
|
132
142
|
describe :lint_files do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ash Furrow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger
|