             outputFiles: outputFiles
         )
     }
+
+    /// Validates the configuration file for various user errors.
+    private func validateConfiguration(_ configuration: Configuration) throws {
+        for invocation in configuration.invocations {
+            for protoFile in invocation.protoFiles {
+                if !protoFile.hasSuffix(".proto") {
+                    throw PluginError.invalidInputFileExtension
+                }
+            }
+        }
+    }
 }

    enum PluginError: Error {
        /// Indicates that the target where the plugin was applied to was not `SourceModuleTarget`.
        case invalidTarget
        /// Indicates that no config file was present in the root of the target directory.
        case noConfigFile
    }

    /// The configuration of the plugin.

        var inputFiles = [Path]()
        var outputFiles = [Path]()

        for var file in invocation.protoFiles {
            // Append the file to the protoc args so that it is used for generating
            protocArgs.append("\(file)")
            inputFiles.append(target.directory.appending(file))

            // The name of the output file is based on the name of the input file.
            // We validated in the beginning that every file has the suffix of .proto
            // This means we can just drop the last 5 elements and append the new suffix
            file.removeLast(5)
            file.append("pb.swift")
            let protobufOutputPath = outputDirectory.appending(file)

            // Add the outputPath as an output file
            outputFiles.append(protobufOutputPath)
