nexocop 0.0.3 → 0.0.4
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 +5 -5
- data/lib/nexocop/git.rb +9 -0
- data/lib/nexocop/options.rb +4 -0
- data/lib/nexocop/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ac20ecaba05e8f7b2cf27ceee34298b5a2290e5ba69f157d51fcabe655893fd6
|
4
|
+
data.tar.gz: b745584f605b429373caeb19e273b2d629231d02399cb10c397d9299803761a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f487669380f56168ceaf3b30938e291aec5244c7df0409f9d4191efbb58c84fc199f3dfaaf04b4d1f65e91323473c1d9ef412eb8fe2ed4db4b66859e77fb533
|
7
|
+
data.tar.gz: 5191e8d2bc569205df31511f56a60a5c69cc8f0b16e445e7078423d2ccf731f77b6c3f12d9b76fb478dd5da7c424559233f9e3e4c9cff0696dc1c2ae7af84a72
|
data/lib/nexocop/git.rb
CHANGED
@@ -31,6 +31,15 @@ module Nexocop
|
|
31
31
|
lines
|
32
32
|
end
|
33
33
|
|
34
|
+
#
|
35
|
+
# Get an array of filenames that have changed. Path is relative to the git root
|
36
|
+
#
|
37
|
+
def self.changed_files
|
38
|
+
Sh.run_command('git diff --diff-filter=AM origin/master --name-only')
|
39
|
+
.stdout
|
40
|
+
.split("\n")
|
41
|
+
end
|
42
|
+
|
34
43
|
def self.filename?(line)
|
35
44
|
line.start_with?('+++ b/')
|
36
45
|
end
|
data/lib/nexocop/options.rb
CHANGED
@@ -26,6 +26,10 @@ module Nexocop
|
|
26
26
|
rubocop_args.push(%w[--format json -o].push(default_json_file)).flatten!
|
27
27
|
end
|
28
28
|
|
29
|
+
# Filter files that haven't changed at all so rubocop doesn't waste time
|
30
|
+
# checking them when we are going to throw them away anyway
|
31
|
+
rubocop_args.concat(Git::changed_files)
|
32
|
+
|
29
33
|
OpenStruct.new(
|
30
34
|
json_outfile: json_outfile,
|
31
35
|
rubocop_args: rubocop_args
|
data/lib/nexocop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
119
|
+
rubygems_version: 2.7.6
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Easy rubocop wrapping for git diffs
|