mirror of
https://github.com/LukeHagar/slinky.git
synced 2025-12-06 04:21:20 +00:00
Add debug logging for scanned files in fsurls.go to improve visibility during URL collection
This commit is contained in:
@@ -88,7 +88,7 @@ func init() {
|
||||
// Emit GitHub Actions debug log for each URL.
|
||||
// These lines appear only when step debug logging is enabled via the
|
||||
// repository/organization secret ACTIONS_STEP_DEBUG=true.
|
||||
fmt.Printf("::debug::URL %s status=%d ok=%v err=%s sources=%d\n", r.URL, r.Status, r.OK, r.ErrMsg, len(r.Sources))
|
||||
fmt.Printf("::debug:: Scanned URL: %s status=%d ok=%v err=%s sources=%d\n", r.URL, r.Status, r.OK, r.ErrMsg, len(r.Sources))
|
||||
if jsonOut != "" && !r.OK {
|
||||
failures = append(failures, SerializableResult{
|
||||
URL: r.URL,
|
||||
|
||||
@@ -2,6 +2,7 @@ package fsurls
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -106,6 +107,9 @@ func CollectURLs(rootPath string, globs []string) (map[string][]string, error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Debug: announce file being parsed; GitHub shows ::debug only in debug runs
|
||||
fmt.Printf("::debug:: Scanned File: %s\n", rel)
|
||||
|
||||
f, ferr := os.Open(path)
|
||||
if ferr != nil {
|
||||
return nil
|
||||
@@ -207,7 +211,7 @@ func trimTrailingDelimiters(s string) string {
|
||||
return s
|
||||
}
|
||||
last := s[len(s)-1]
|
||||
if strings.ContainsRune(").,;:!?]'\"}", rune(last)) {
|
||||
if strings.ContainsRune(").,;:!?]'"}", rune(last)) {
|
||||
s = s[:len(s)-1]
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user