quality 23.0.6 → 23.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quality/linguist_source_file_globber.rb +12 -3
- data/lib/quality/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9bc167ba873b117fd6a68918b2d725e6ed690c7
|
4
|
+
data.tar.gz: b6449ddb9ef200f22ede802b4b725ef0599b1800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa41d35028970df19bd0a9ba63dd6f2bc2dd9cdeb3db366b14bee04783d8712a7ecb16854c0f2d55ff609405c3b303fbbc836e2bbd2fbe3df40e0c23766542ee
|
7
|
+
data.tar.gz: 814504792158be36626ff1ffd92d1fc0119a12f56505be93cf22d599d788a6e3a67e5a21c3735dbc89d4b4afd6b3b82c459f3e95516be44336ae02a9597ab3d0
|
@@ -11,12 +11,14 @@ module Quality
|
|
11
11
|
commit: repo.head,
|
12
12
|
project: Linguist::Repository.new(repo, commit.target_id),
|
13
13
|
file_blob: Linguist::FileBlob,
|
14
|
+
file_class: File,
|
14
15
|
pwd: Dir.pwd)
|
15
16
|
@repo = repo
|
16
17
|
@commit = commit
|
17
18
|
@project = project
|
18
19
|
@breakdown_by_file = @project.breakdown_by_file
|
19
20
|
@file_blob = file_blob
|
21
|
+
@file_class = file_class
|
20
22
|
@exclude_files = nil
|
21
23
|
@pwd = pwd
|
22
24
|
end
|
@@ -32,14 +34,21 @@ module Quality
|
|
32
34
|
mode_format == 0o0160000
|
33
35
|
end
|
34
36
|
|
37
|
+
def ok_to_process?(filename, file)
|
38
|
+
file[:type] == :blob &&
|
39
|
+
!submodule_or_symlink?(file) &&
|
40
|
+
@file_class.exist?(filename) &&
|
41
|
+
!@file_class.symlink?(filename) &&
|
42
|
+
@file_class.readable?(filename)
|
43
|
+
end
|
44
|
+
|
35
45
|
def all_files
|
36
46
|
@source_files ||= begin
|
37
47
|
files = []
|
38
48
|
tree = @commit.target.tree
|
39
49
|
tree.walk(:preorder) do |root, file|
|
40
|
-
|
41
|
-
|
42
|
-
end
|
50
|
+
filename = "#{root}#{file[:name]}"
|
51
|
+
files << filename if ok_to_process?(filename, file)
|
43
52
|
end
|
44
53
|
files
|
45
54
|
end
|
data/lib/quality/version.rb
CHANGED