     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
+        /// Indicates that the file extension of an input file was not `.proto`.
+        case invalidInputFileExtension
     }
 
     /// The configuration of the plugin.

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

        for 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.
            let protobufOutputName = file.replacingOccurrences(of: ".proto", with: ".pb.swift")
            let protobufOutputPath = outputDirectory.appending(protobufOutputName)

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

    static let configurationFileName = "swift-protobuf-config.json"

    func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] {
        // Let's check that this is a source target
        guard let target = target as? SourceModuleTarget else {
            throw PluginError.invalidTarget
        }

        // We need to find the configuration file at the root of the target
        let configurationFilePath = target.directory.appending(subpath: Self.configurationFileName)
        let data = try Data(contentsOf: URL(fileURLWithPath: "\(configurationFilePath)"))
        let configuration = try JSONDecoder().decode(Configuration.self, from: data)

        try self.validateConfiguration(configuration)

        // We need to find the path of protoc and protoc-gen-swift
        let protocPath: Path
