quality 23.0.1 → 23.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 867dba0961722fdfcab47a9aea284474f4551580
4
- data.tar.gz: 34337576c4db051f1ceed5a1f43f2b2f4644e9a2
3
+ metadata.gz: 49ec2b14b69e1e46b1639b6c45dccae827587312
4
+ data.tar.gz: 8dca7aeb97809947d0f683f3839a9d94369d1ce3
5
5
  SHA512:
6
- metadata.gz: c73d2ae55474ff496bef1d62c6b859228efd948a468912920ac173a52a4fd822f53172bb5a0013025ab894ad2962e6beedeee984313bf46a1e7de67cb46d52da
7
- data.tar.gz: 53240b7fad0754d5107ca99e53cb355e4651b01c9fc78092a60ff007a6aba04cf6b1f15b17e0df5e499e80c3da308b9f2a7b90773f884add168c063927c23c93
6
+ metadata.gz: 063e2d1109349c75f50116f7e3b638a037cdbb338c0cbd0721e6a8d05c1365fdc7c4ad5145895d51564470f43402b4d30d3d45d3e0c5a28d9a41149d80b622f7
7
+ data.tar.gz: ddbe23614abeb07ec9d305e37906f7f047cb9aa6322cc866fb597a782c363eeb8a00f21ed750497d85078e588931b75a76c6abc106440f7772417b8a2bb38300
@@ -20,12 +20,23 @@ module Quality
20
20
  @pwd = pwd
21
21
  end
22
22
 
23
+ def submodule_or_symlink?(file)
24
+ # Skip submodules and symlinks
25
+ mode = file[:mode]
26
+ mode_format = (mode & 0o0170000)
27
+ mode_format == 0o0120000 ||
28
+ mode_format == 0o040000 ||
29
+ mode_format == 0o0160000
30
+ end
31
+
23
32
  def all_files
24
33
  @source_files ||= begin
25
34
  files = []
26
35
  tree = @commit.target.tree
27
36
  tree.walk(:preorder) do |root, file|
28
- files << "#{root}#{file[:name]}" if file[:type] == :blob
37
+ unless submodule_or_symlink?(file)
38
+ files << "#{root}#{file[:name]}" if file[:type] == :blob
39
+ end
29
40
  end
30
41
  files
31
42
  end
@@ -49,6 +60,7 @@ module Quality
49
60
  def real_files_matching
50
61
  all_files.select do |filename|
51
62
  blob = @file_blob.new(filename, @pwd)
63
+
52
64
  if blob.generated? || blob.vendored?
53
65
  false
54
66
  else
@@ -4,5 +4,5 @@
4
4
  # reek, flog, flay and rubocop and makes sure your numbers don't get
5
5
  # any worse over time.
6
6
  module Quality
7
- VERSION = '23.0.1'
7
+ VERSION = '23.0.2'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.0.1
4
+ version: 23.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz