danger-swiftlint 0.4.1 → 0.5.0
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/Changelog.md +4 -0
- data/Gemfile.lock +30 -31
- data/lib/danger_plugin.rb +3 -1
- data/lib/version.rb +2 -2
- data/spec/danger_plugin_spec.rb +15 -0
- data/spec/fixtures/empty_excluded.yml +7 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24ffc13551a8fc301e52e246257e507939190185
|
|
4
|
+
data.tar.gz: f194d6b75fc9dd688cd624a6dd61bac56cf691d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4029424658ca97f7548a22a01b57c587b74c6a2448eb7ece889d79b433e47d398f490f922995d071e90b1c419f6ea7a613099338eda60588b110af19745f5b1e
|
|
7
|
+
data.tar.gz: 0b5b53d7fb22979333e2ad1ced741e39e017ab7b89ddddee47c41ddac716523185e4c1c2dde69b31e4d884081f77611b24ffb768071f15e95baf6ea9f24c54f1
|
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
danger-swiftlint (0.
|
|
4
|
+
danger-swiftlint (0.5.0)
|
|
5
5
|
danger
|
|
6
6
|
rake (~> 10.0)
|
|
7
7
|
thor (~> 0.19)
|
|
@@ -9,7 +9,7 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
addressable (2.5.
|
|
12
|
+
addressable (2.5.1)
|
|
13
13
|
public_suffix (~> 2.0, >= 2.0.2)
|
|
14
14
|
bacon (1.2.0)
|
|
15
15
|
claide (1.0.1)
|
|
@@ -18,11 +18,10 @@ GEM
|
|
|
18
18
|
nap
|
|
19
19
|
open4 (~> 1.3)
|
|
20
20
|
coderay (1.1.1)
|
|
21
|
-
colored (1.2)
|
|
22
21
|
colored2 (3.1.2)
|
|
23
|
-
cork (0.
|
|
24
|
-
|
|
25
|
-
danger (
|
|
22
|
+
cork (0.3.0)
|
|
23
|
+
colored2 (~> 3.1)
|
|
24
|
+
danger (5.1.0)
|
|
26
25
|
claide (~> 1.0)
|
|
27
26
|
claide-plugins (>= 0.9.2)
|
|
28
27
|
colored2 (~> 3.1)
|
|
@@ -33,15 +32,15 @@ GEM
|
|
|
33
32
|
kramdown (~> 1.5)
|
|
34
33
|
octokit (~> 4.2)
|
|
35
34
|
terminal-table (~> 1)
|
|
36
|
-
diff-lcs (1.
|
|
37
|
-
faraday (0.
|
|
35
|
+
diff-lcs (1.3)
|
|
36
|
+
faraday (0.12.1)
|
|
38
37
|
multipart-post (>= 1.2, < 3)
|
|
39
38
|
faraday-http-cache (1.3.1)
|
|
40
39
|
faraday (~> 0.8)
|
|
41
|
-
ffi (1.9.
|
|
40
|
+
ffi (1.9.18)
|
|
42
41
|
formatador (0.2.5)
|
|
43
42
|
git (1.3.0)
|
|
44
|
-
guard (2.14.
|
|
43
|
+
guard (2.14.1)
|
|
45
44
|
formatador (>= 0.2.4)
|
|
46
45
|
listen (>= 2.7, < 4.0)
|
|
47
46
|
lumberjack (~> 1.0)
|
|
@@ -51,7 +50,7 @@ GEM
|
|
|
51
50
|
shellany (~> 0.0)
|
|
52
51
|
thor (>= 0.18.1)
|
|
53
52
|
guard-compat (1.2.1)
|
|
54
|
-
guard-rspec (4.7.
|
|
53
|
+
guard-rspec (4.7.3)
|
|
55
54
|
guard (~> 2.1)
|
|
56
55
|
guard-compat (~> 1.1)
|
|
57
56
|
rspec (>= 2.99.0, < 4.0)
|
|
@@ -59,46 +58,46 @@ GEM
|
|
|
59
58
|
listen (3.0.7)
|
|
60
59
|
rb-fsevent (>= 0.9.3)
|
|
61
60
|
rb-inotify (>= 0.9.7)
|
|
62
|
-
lumberjack (1.0.
|
|
61
|
+
lumberjack (1.0.11)
|
|
63
62
|
metaclass (0.0.4)
|
|
64
63
|
method_source (0.8.2)
|
|
65
|
-
mocha (1.1
|
|
64
|
+
mocha (1.2.1)
|
|
66
65
|
metaclass (~> 0.0.1)
|
|
67
|
-
mocha-on-bacon (0.2.
|
|
66
|
+
mocha-on-bacon (0.2.3)
|
|
68
67
|
mocha (>= 0.13.0)
|
|
69
68
|
multipart-post (2.0.0)
|
|
70
69
|
nap (1.1.0)
|
|
71
70
|
nenv (0.3.0)
|
|
72
|
-
notiffany (0.1.
|
|
71
|
+
notiffany (0.1.1)
|
|
73
72
|
nenv (~> 0.1)
|
|
74
73
|
shellany (~> 0.0)
|
|
75
|
-
octokit (4.
|
|
74
|
+
octokit (4.7.0)
|
|
76
75
|
sawyer (~> 0.8.0, >= 0.5.3)
|
|
77
76
|
open4 (1.3.4)
|
|
78
77
|
prettybacon (0.0.2)
|
|
79
78
|
bacon (~> 1.2)
|
|
80
|
-
pry (0.10.
|
|
79
|
+
pry (0.10.4)
|
|
81
80
|
coderay (~> 1.1.0)
|
|
82
81
|
method_source (~> 0.8.1)
|
|
83
82
|
slop (~> 3.4)
|
|
84
83
|
public_suffix (2.0.5)
|
|
85
84
|
rake (10.5.0)
|
|
86
|
-
rb-fsevent (0.9.
|
|
87
|
-
rb-inotify (0.9.
|
|
85
|
+
rb-fsevent (0.9.8)
|
|
86
|
+
rb-inotify (0.9.8)
|
|
88
87
|
ffi (>= 0.5.0)
|
|
89
|
-
rspec (3.
|
|
90
|
-
rspec-core (~> 3.
|
|
91
|
-
rspec-expectations (~> 3.
|
|
92
|
-
rspec-mocks (~> 3.
|
|
93
|
-
rspec-core (3.
|
|
94
|
-
rspec-support (~> 3.
|
|
95
|
-
rspec-expectations (3.
|
|
88
|
+
rspec (3.5.0)
|
|
89
|
+
rspec-core (~> 3.5.0)
|
|
90
|
+
rspec-expectations (~> 3.5.0)
|
|
91
|
+
rspec-mocks (~> 3.5.0)
|
|
92
|
+
rspec-core (3.5.4)
|
|
93
|
+
rspec-support (~> 3.5.0)
|
|
94
|
+
rspec-expectations (3.5.0)
|
|
96
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
97
|
-
rspec-support (~> 3.
|
|
98
|
-
rspec-mocks (3.
|
|
96
|
+
rspec-support (~> 3.5.0)
|
|
97
|
+
rspec-mocks (3.5.0)
|
|
99
98
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
100
|
-
rspec-support (~> 3.
|
|
101
|
-
rspec-support (3.
|
|
99
|
+
rspec-support (~> 3.5.0)
|
|
100
|
+
rspec-support (3.5.0)
|
|
102
101
|
sawyer (0.8.1)
|
|
103
102
|
addressable (>= 2.3.5, < 2.6)
|
|
104
103
|
faraday (~> 0.8, < 1.0)
|
|
@@ -106,7 +105,7 @@ GEM
|
|
|
106
105
|
slop (3.6.0)
|
|
107
106
|
terminal-table (1.7.3)
|
|
108
107
|
unicode-display_width (~> 1.1.1)
|
|
109
|
-
thor (0.19.
|
|
108
|
+
thor (0.19.4)
|
|
110
109
|
unicode-display_width (1.1.3)
|
|
111
110
|
|
|
112
111
|
PLATFORMS
|
data/lib/danger_plugin.rb
CHANGED
|
@@ -119,8 +119,10 @@ module Danger
|
|
|
119
119
|
{"excluded" => []}
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
+
excluded_paths = config['excluded'] || []
|
|
123
|
+
|
|
122
124
|
# Extract excluded paths
|
|
123
|
-
return
|
|
125
|
+
return excluded_paths.
|
|
124
126
|
map { |path| File.join(File.dirname(config_file), path) }.
|
|
125
127
|
map { |path| File.expand_path(path) }.
|
|
126
128
|
select { |path| File.exists?(path) || Dir.exists?(path) }
|
data/lib/version.rb
CHANGED
data/spec/danger_plugin_spec.rb
CHANGED
|
@@ -103,6 +103,21 @@ module Danger
|
|
|
103
103
|
@swiftlint.lint_files
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
it 'does not crash when excluded is nil' do
|
|
107
|
+
allow(@swiftlint.git).to receive(:added_files).and_return([])
|
|
108
|
+
allow(@swiftlint.git).to receive(:modified_files).and_return([
|
|
109
|
+
'spec/fixtures/SwiftFile.swift',
|
|
110
|
+
])
|
|
111
|
+
|
|
112
|
+
expect(Swiftlint).to receive(:lint)
|
|
113
|
+
.with(hash_including(:path => File.expand_path('spec/fixtures/SwiftFile.swift')))
|
|
114
|
+
.and_return(@swiftlint_response)
|
|
115
|
+
.once
|
|
116
|
+
|
|
117
|
+
@swiftlint.config_file = 'spec/fixtures/empty_excluded.yml'
|
|
118
|
+
@swiftlint.lint_files
|
|
119
|
+
end
|
|
120
|
+
|
|
106
121
|
it 'does not lint deleted files paths' do
|
|
107
122
|
# Danger (4.3.0 at the time of writing) returns deleted files in the
|
|
108
123
|
# modified fiels array, which kinda makes sense.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-swiftlint
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ash Furrow
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date: 2017-04-
|
|
15
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: danger
|
|
@@ -170,6 +170,7 @@ files:
|
|
|
170
170
|
- lib/version.rb
|
|
171
171
|
- spec/danger_plugin_spec.rb
|
|
172
172
|
- spec/fixtures/SwiftFile.swift
|
|
173
|
+
- spec/fixtures/empty_excluded.yml
|
|
173
174
|
- spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
|
|
174
175
|
- spec/fixtures/some_config.yml
|
|
175
176
|
- spec/spec_helper.rb
|
|
@@ -194,13 +195,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
194
195
|
version: '0'
|
|
195
196
|
requirements: []
|
|
196
197
|
rubyforge_project:
|
|
197
|
-
rubygems_version: 2.
|
|
198
|
+
rubygems_version: 2.6.11
|
|
198
199
|
signing_key:
|
|
199
200
|
specification_version: 4
|
|
200
201
|
summary: A Danger plugin for linting Swift with SwiftLint.
|
|
201
202
|
test_files:
|
|
202
203
|
- spec/danger_plugin_spec.rb
|
|
203
204
|
- spec/fixtures/SwiftFile.swift
|
|
205
|
+
- spec/fixtures/empty_excluded.yml
|
|
204
206
|
- spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
|
|
205
207
|
- spec/fixtures/some_config.yml
|
|
206
208
|
- spec/spec_helper.rb
|