fix: resolve golangci-lint failures in jfrog storage implementation

- Remove unused pathCache field from PublishedStorage struct
- Remove unused md5s accumulation in Filelist()
- Fix unchecked error return on expectedOut.Write in config_test.go
- Suppress unused linter on configFileYAML/configFileYAMLError constants
  (retained to avoid merge conflicts with feat/pls/gcs-support)
- Add --timeout=10m to golangci-lint workflow
- add back removed tests
This commit is contained in:
Pierig Le Saux
2026-04-09 10:55:53 -04:00
committed by André Roth
parent 4b8f0c42ac
commit 214c151194
3 changed files with 126 additions and 6 deletions
+3 -6
View File
@@ -21,7 +21,6 @@ type PublishedStorage struct {
repository string
prefix string
plusWorkaround bool
pathCache map[string]string
}
// Check interface
@@ -138,16 +137,14 @@ func (storage *PublishedStorage) Filelist(prefix string) ([]string, error) {
defer reader.Close()
var paths []string
var md5s []string
for element := new(utils.ResultItem); reader.NextRecord(element) == nil; element = new(utils.ResultItem) {
path := element.Path + "/" + element.Name
relPath := strings.TrimPrefix(path, storage.repository + "/" + storage.prefix + "/")
relPath := strings.TrimPrefix(path, storage.repository+"/"+storage.prefix+"/")
if storage.plusWorkaround {
relPath = strings.Replace(relPath, "%2B", "+", -1)
relPath = strings.Replace(relPath, "%2B", "+", -1)
}
paths = append(paths, relPath)
md5s = append(md5s, element.Actual_Md5)
}
return paths, nil