diff --git a/lib/modules/manager/swift/extract.ts b/lib/modules/manager/swift/extract.ts
index 9af1fa74196a7b6b0533e7f5607f32dde186e421..c142e44cd5986969a2352e70758e0e8be872722a 100644
--- a/lib/modules/manager/swift/extract.ts
+++ b/lib/modules/manager/swift/extract.ts
@@ -119,6 +119,7 @@ function getMatch(str: string, state: string | null): MatchResult | null {
 }
 
 function getDepName(url: string | null): string | null {
+  // istanbul ignore if
   if (!url) {
     return null;
   }