mutating func validate()

in Sources/Mockolo/Executor.swift [144:162]


    mutating func validate() throws {
        guard Executor.validLoggingLevels.contains(loggingLevel) else {
            throw ValidationError("Please specify a valid logging level in the range: \(Executor.validLoggingLevels)")
        }

        srcDirs = self.sourceDirs.map(fullPath)

        // If source file list exists, source files value will be overridden (see the usage in setupArguments above)
        if let srcList = sourceFileList {
            let text = try? String(contentsOfFile: srcList, encoding: String.Encoding.utf8)
            srcs = text?.components(separatedBy: "\n").filter{!$0.isEmpty}.map(fullPath) ?? []
        } else {
            srcs = sourceFiles.map(fullPath)
        }

        if srcDirs.isEmpty && srcs.isEmpty {
            throw ValidationError("Missing source files or directories")
        }
    }