danger-swiftlint 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Changelog.md +6 -0
- data/Gemfile.lock +6 -6
- data/danger-swiftlint.gemspec +1 -1
- data/lib/danger_plugin.rb +6 -2
- data/lib/version.rb +1 -1
- data/spec/danger_plugin_spec.rb +2 -1
- data/spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift +1 -0
- data/spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40757cebea3dbc6624dba8273588487d0cdde1f7
|
4
|
+
data.tar.gz: 6c95846be51abaeec3ee99ed87eeb3c082fdd70a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 736318a6287be021e6d95a537cb4d067a15892e9e884ee0ca4a607626f75200b68d68258a9f47de55f65977268f9e87052597f45ac689fb0da7a7843abf8bebc
|
7
|
+
data.tar.gz: d22f58da0bec13124cfbb29b142ed2b0dcfac6a25ebcd3a88fcd21768e781c18dd87d8279e185ccd623ee5158b8b8c18202775abb4377928b11264dc37cdee6e
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.4
|
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
danger-swiftlint (0.5.0)
|
5
5
|
danger
|
6
|
-
rake (
|
6
|
+
rake (> 10)
|
7
7
|
thor (~> 0.19)
|
8
8
|
|
9
9
|
GEM
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
colored2 (3.1.2)
|
22
22
|
cork (0.3.0)
|
23
23
|
colored2 (~> 3.1)
|
24
|
-
danger (5.1
|
24
|
+
danger (5.2.1)
|
25
25
|
claide (~> 1.0)
|
26
26
|
claide-plugins (>= 0.9.2)
|
27
27
|
colored2 (~> 3.1)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
method_source (~> 0.8.1)
|
82
82
|
slop (~> 3.4)
|
83
83
|
public_suffix (2.0.5)
|
84
|
-
rake (
|
84
|
+
rake (12.0.0)
|
85
85
|
rb-fsevent (0.9.8)
|
86
86
|
rb-inotify (0.9.8)
|
87
87
|
ffi (>= 0.5.0)
|
@@ -103,10 +103,10 @@ GEM
|
|
103
103
|
faraday (~> 0.8, < 1.0)
|
104
104
|
shellany (0.0.1)
|
105
105
|
slop (3.6.0)
|
106
|
-
terminal-table (1.
|
107
|
-
unicode-display_width (~> 1.1.1)
|
106
|
+
terminal-table (1.8.0)
|
107
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
108
108
|
thor (0.19.4)
|
109
|
-
unicode-display_width (1.1
|
109
|
+
unicode-display_width (1.2.1)
|
110
110
|
|
111
111
|
PLATFORMS
|
112
112
|
ruby
|
data/danger-swiftlint.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency 'danger'
|
23
23
|
spec.add_dependency 'thor', '~> 0.19'
|
24
|
-
spec.add_dependency 'rake', '
|
24
|
+
spec.add_dependency 'rake', '> 10'
|
25
25
|
|
26
26
|
# General ruby development
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
data/lib/danger_plugin.rb
CHANGED
@@ -90,7 +90,7 @@ module Danger
|
|
90
90
|
# If files are not provided it will use git modifield and added files
|
91
91
|
#
|
92
92
|
# @return [Array] swift files
|
93
|
-
def find_swift_files(files=nil,
|
93
|
+
def find_swift_files(files=nil, excluded_paths=[])
|
94
94
|
# Assign files to lint
|
95
95
|
files = files ? Dir.glob(files) : (git.modified_files - git.deleted_files) + git.added_files
|
96
96
|
|
@@ -105,7 +105,11 @@ module Danger
|
|
105
105
|
map { |file| File.expand_path(file) }.
|
106
106
|
# Reject files excluded on configuration
|
107
107
|
reject { |file|
|
108
|
-
|
108
|
+
excluded_paths.any? { |excluded_path|
|
109
|
+
Find.find(excluded_path).
|
110
|
+
map { |excluded_file| Shellwords.escape(excluded_file) }.
|
111
|
+
include?(file)
|
112
|
+
}
|
109
113
|
}
|
110
114
|
end
|
111
115
|
|
data/lib/version.rb
CHANGED
data/spec/danger_plugin_spec.rb
CHANGED
@@ -91,7 +91,8 @@ module Danger
|
|
91
91
|
allow(@swiftlint.git).to receive(:added_files).and_return([])
|
92
92
|
allow(@swiftlint.git).to receive(:modified_files).and_return([
|
93
93
|
'spec/fixtures/SwiftFile.swift',
|
94
|
-
'spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift'
|
94
|
+
'spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift',
|
95
|
+
'spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift'
|
95
96
|
])
|
96
97
|
|
97
98
|
expect(Swiftlint).to receive(:lint)
|
@@ -0,0 +1 @@
|
|
1
|
+
// This file intentionally left blank-ish.
|
@@ -1 +1 @@
|
|
1
|
-
// This file
|
1
|
+
// This file intentionally left blank-ish.
|
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.5.
|
4
|
+
version: 0.5.1
|
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-
|
15
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: danger
|
@@ -46,16 +46,16 @@ dependencies:
|
|
46
46
|
name: rake
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- - "
|
49
|
+
- - ">"
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version: '10
|
51
|
+
version: '10'
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- - "
|
56
|
+
- - ">"
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: '10
|
58
|
+
version: '10'
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: bundler
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- spec/danger_plugin_spec.rb
|
172
172
|
- spec/fixtures/SwiftFile.swift
|
173
173
|
- spec/fixtures/empty_excluded.yml
|
174
|
+
- spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift
|
174
175
|
- spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
|
175
176
|
- spec/fixtures/some_config.yml
|
176
177
|
- spec/spec_helper.rb
|
@@ -203,6 +204,7 @@ test_files:
|
|
203
204
|
- spec/danger_plugin_spec.rb
|
204
205
|
- spec/fixtures/SwiftFile.swift
|
205
206
|
- spec/fixtures/empty_excluded.yml
|
207
|
+
- spec/fixtures/excluded_dir/SwiftFile WithEscaped+CharactersThatShouldNotBeIncluded.swift
|
206
208
|
- spec/fixtures/excluded_dir/SwiftFileThatShouldNotBeIncluded.swift
|
207
209
|
- spec/fixtures/some_config.yml
|
208
210
|
- spec/spec_helper.rb
|