pronto-rubocop 0.2.4 → 0.2.5
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/lib/pronto/rubocop.rb +12 -4
- data/lib/pronto/rubocop/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffcd61fbeb4a83e97be21ea78b599ae0ddb00b66
|
4
|
+
data.tar.gz: dbee3812fef662d62855e9ffb110f2d53b621435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6249c3238c4963f1b8091066427fc2f2bcfe5b2dc552b7904fa6efd70b39a53965d22da6a131e62434fc4365e60a767ed72c7df9111edf8e2fc40266c14e390
|
7
|
+
data.tar.gz: 0f58342834069357c924687f38a4845fff4c4cafbceb5746c2bac8dbdc8431c335c43e69a587000845144cd6f51e6e420be01dfe41cb68fadfc6258ae9b642a6
|
data/lib/pronto/rubocop.rb
CHANGED
@@ -11,10 +11,13 @@ module Pronto
|
|
11
11
|
def run(patches, _)
|
12
12
|
return [] unless patches
|
13
13
|
|
14
|
-
patches.select
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
valid_patches = patches.select do |patch|
|
15
|
+
patch.additions > 0 &&
|
16
|
+
ruby_file?(patch.new_file_full_path) &&
|
17
|
+
!excluded?(patch)
|
18
|
+
end
|
19
|
+
|
20
|
+
valid_patches.map { |patch| inspect(patch) }.flatten.compact
|
18
21
|
end
|
19
22
|
|
20
23
|
def inspect(patch)
|
@@ -34,6 +37,11 @@ module Pronto
|
|
34
37
|
Message.new(path, line, level, offence.message)
|
35
38
|
end
|
36
39
|
|
40
|
+
def excluded?(patch)
|
41
|
+
path = patch.new_file_full_path.to_s
|
42
|
+
@config_store.for(path).file_to_exclude?(path)
|
43
|
+
end
|
44
|
+
|
37
45
|
def level(severity)
|
38
46
|
case severity
|
39
47
|
when :refactor, :convention
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindaugas Mozūras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -96,8 +96,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: 1.3.6
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.3.0
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Pronto runner for Rubocop, ruby code analyzer
|
103
103
|
test_files: []
|
104
|
+
has_rdoc:
|