mirror of
https://github.com/veggiemonk/awesome-docker.git
synced 2026-04-02 15:45:41 +02:00
fix: prevent false link-check failures and harden health/workflow errors
Address three review findings from the Go rewrite:\n\n- checker: update PartitionLinks to only classify HTTP(S) URLs as external links.\n This skips markdown-relative targets (for example and anchors) so\n non-URL entries are no longer sent to HTTP validation and do not produce\n deterministic "unsupported protocol scheme" failures.\n\n- health command: stop ignoring LoadHealthCache errors.\n Return a user-facing "load cache" error when the cache file is unreadable\n or invalid instead of allowing a nil cache panic on Merge.\n\n- broken links workflow: remove masked execution behavior from the link check\n step. Capture awesome-docker check exit code, set has_errors=true on any\n non-zero exit, and expose the exit code in the generated issue body so\n checker failures are visible and cannot incorrectly close the tracking issue.\n\nTest coverage updates:\n- extend checker partition test to include markdown-relative/anchor targets\n and verify they are not treated as external URLs.\n- add cache test for invalid YAML load failure.
This commit is contained in:
@@ -204,7 +204,10 @@ func healthCmd() *cobra.Command {
|
||||
scored := scorer.ScoreAll(infos)
|
||||
cacheEntries := scorer.ToCacheEntries(scored)
|
||||
|
||||
hc, _ := cache.LoadHealthCache(healthCachePath)
|
||||
hc, err := cache.LoadHealthCache(healthCachePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("load cache: %w", err)
|
||||
}
|
||||
hc.Merge(cacheEntries)
|
||||
if err := cache.SaveHealthCache(healthCachePath, hc); err != nil {
|
||||
return fmt.Errorf("save cache: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user