rubocop-changes 0.8.0 → 0.8.1
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/rubocop/changes/checker.rb +10 -6
- data/lib/rubocop/changes/version.rb +1 -1
- 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: 50ba12f7f5d19c871a2d3ea88b3e04f08dc568e3c662d6250c32e4a524d5bf9f
|
|
4
|
+
data.tar.gz: c1b438aeea0f9796093617663b00c737a6bc1325fe4e0593125318de005f0422
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 598a1939a20f292b1ece470057e7ba633ce5721a3c0950efa45aef16e138fe0f89e4d4c910d46052ba51da5d13af8d64e26820a72bab55c466e491796dfc1127
|
|
7
|
+
data.tar.gz: 56193641cd04df8b28c120ed3bf638da9dddcaae43b8a86f3e9621d3672c4454b38307a1ffec3d9335e6baaa30b8a57c5c2ca374f339419ceb8e4ed32ce00c47
|
|
@@ -73,11 +73,7 @@ module Rubocop
|
|
|
73
73
|
|
|
74
74
|
def ruby_changed_files_from_pwd
|
|
75
75
|
ruby_changed_files.map do |path|
|
|
76
|
-
|
|
77
|
-
path.gsub(/^#{path_prefix}\//, '')
|
|
78
|
-
else
|
|
79
|
-
path
|
|
80
|
-
end
|
|
76
|
+
from_pwd_path(path)
|
|
81
77
|
end
|
|
82
78
|
end
|
|
83
79
|
|
|
@@ -110,7 +106,7 @@ module Rubocop
|
|
|
110
106
|
|
|
111
107
|
def checks
|
|
112
108
|
@checks ||= ruby_changed_files.map do |file|
|
|
113
|
-
analysis = rubocop_json.files.find { |item| item.path == file }
|
|
109
|
+
analysis = rubocop_json.files.find { |item| item.path == from_pwd_path(file) }
|
|
114
110
|
patch = patches.find { |item| item.file == file }
|
|
115
111
|
|
|
116
112
|
next unless analysis
|
|
@@ -169,6 +165,14 @@ module Rubocop
|
|
|
169
165
|
|
|
170
166
|
formatter.file_finished(check.path, offenses)
|
|
171
167
|
end
|
|
168
|
+
|
|
169
|
+
def from_pwd_path(path)
|
|
170
|
+
if path_prefix
|
|
171
|
+
path.gsub(/^#{path_prefix}\//, '')
|
|
172
|
+
else
|
|
173
|
+
path
|
|
174
|
+
end
|
|
175
|
+
end
|
|
172
176
|
end
|
|
173
177
|
end
|
|
174
178
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubocop-changes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ferran Basora
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: git_diff_parser
|