judgelint 0.1.6-aarch64-linux → 0.1.7-aarch64-linux
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/CHANGELOG.md +5 -0
- data/lib/judgelint/glob.rb +21 -1
- data/lib/judgelint/rule.rb +1 -1
- data/lib/judgelint/version.rb +1 -1
- data/libexec/judgelint +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27961d6e4a1e8329a123cee50be37cd5657c727d1c8babf8e09ec86049044d58
|
|
4
|
+
data.tar.gz: ec33d19a4acc734ad7ab1c766e2275d771d7c2ca29931b35a188bffc5ca08d42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e4be169bc91730c1bd868bd9fe3645e36b592e7f4335502860e20cfc80106355d2dd8c8e119050b64cec6cb759db309f9f0c0d003ed051a69681484014e7587
|
|
7
|
+
data.tar.gz: 4faf11c5e4ce0319a87560ccd50d19349b00992c588ebd8c9074f9d2b4e1430327546d269d98070d9c0d06ae3cac5ca5898976440beb98adfbb049ff8c6e9929
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.7 (2026-10-26)
|
|
4
|
+
|
|
5
|
+
- A symlink that points to itself no longer crashes a run. Ruby's Dir.glob
|
|
6
|
+
raised ELOOP when a pattern looked inside one; judgelint now skips it.
|
|
7
|
+
|
|
3
8
|
## 0.1.6 (2026-10-26)
|
|
4
9
|
|
|
5
10
|
- `--base` and `--pr` ask about the changed lines, not the 40-line windows
|
data/lib/judgelint/glob.rb
CHANGED
|
@@ -14,7 +14,27 @@ module Judgelint
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.expand(patterns)
|
|
17
|
-
patterns.flat_map { |pattern|
|
|
17
|
+
patterns.flat_map { |pattern| glob(pattern) }.select { |path| File.file?(path) }.uniq.sort
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Dir.glob, except that a symlink to itself is skipped. Dir.glob raises
|
|
21
|
+
# ELOOP when a pattern looks inside one, so the pattern is then globbed a
|
|
22
|
+
# segment at a time, entering only directories that resolve.
|
|
23
|
+
def self.glob(pattern)
|
|
24
|
+
Dir.glob(pattern)
|
|
25
|
+
rescue Errno::ELOOP
|
|
26
|
+
parts = pattern.split("/")
|
|
27
|
+
found = [""]
|
|
28
|
+
until parts.empty?
|
|
29
|
+
part = parts.shift
|
|
30
|
+
part = "#{part}/#{parts.shift}" if part == "**" && !parts.empty?
|
|
31
|
+
found = found.flat_map do |dir|
|
|
32
|
+
next [] unless dir.empty? || File.directory?(dir)
|
|
33
|
+
|
|
34
|
+
Dir.glob(dir.empty? ? part : File.join(dir, part))
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
found
|
|
18
38
|
end
|
|
19
39
|
|
|
20
40
|
# The files to check: in a git repository, those git tracks or would add,
|
data/lib/judgelint/rule.rb
CHANGED
|
@@ -89,7 +89,7 @@ module Judgelint
|
|
|
89
89
|
|
|
90
90
|
# The directories a directory rule governs.
|
|
91
91
|
def directories
|
|
92
|
-
paths.flat_map { |pattern|
|
|
92
|
+
paths.flat_map { |pattern| Glob.glob(pattern) }.select { |path| File.directory?(path) && applies_to?(path) }.uniq.sort
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# The ranges to ask about: windows of +size+ lines, or the whole file.
|
data/lib/judgelint/version.rb
CHANGED
data/libexec/judgelint
CHANGED
|
Binary file
|