             }
         }
     }
+    
+    private func diagnoseInvalidResource(in resources: [Resource]) {
+        resources.forEach { resource in
+            if let message = validTargetPath(at: resource.path) {
+                let warning = "Invalid Resource '\(resource.path)': \(message)."
+                self.diags.emit(warning: warning)
+            }
+        }
+    }
 
     /// Returns true if the given path is a declared source.
     func isDeclaredSource(_ path: AbsolutePath) -> Bool {


    @discardableResult
    private func validTargetPath(at: AbsolutePath) -> Error? {
        guard let cwd = self.fs.currentWorkingDirectory else {
            return StringError("Unknown Current Working Directory")
        }
        
        // Check if paths that are enumerated in targets: [] exist
        guard self.fs.exists(at) else {
            return StringError("\(at) could not be found")
        }

        // Excludes, Sources, and Resources should be found at the root of the package and or
        // its subdirectories
        guard at.pathString.hasPrefix(cwd.pathString) else {
            return StringError("\(at) should be found within the root of \(cwd)")
        }
        
        return nil

                    diags.emit(.error("duplicate resource rule '\(declaredResource.rule)' found for file at '\(path)'"))
                }
                matchedRule = Rule(rule: declaredResource.rule.fileRule, localization: declaredResource.localization)
            }
        }

