fun preprocessFoundFiles()

in plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotcover/report/model/DotNetSourceCodeProvider.kt [154:185]


    fun preprocessFoundFiles(buildLogger: BuildProgressLogger,
                             configParameters: Map<String, String>,
                             referredFiles: Set<Int>) {
        if (LOG.isDebugEnabled) {
            LOG.debug("dotCover reported the following source files to include into report: " + TreeSet(_files.values))
        }

        val cleanFiles = "true".equals(configParameters[NO_SOURCE_FILES_KEY], ignoreCase = true)
        if (cleanFiles) {
            _files.clear()
            LOG.warn("Report will not contain sources. $NO_SOURCE_FILES_KEY configuration parameter was specified.")
            buildLogger.warning("Report will not contain sources. $NO_SOURCE_FILES_KEY configuration parameter was specified.")
            return
        }

        //Remove all files that were not referenced from sources
        _files.keys.retainAll(referredFiles)
        try {
            mapFiles(buildLogger, configParameters)
            validateFoundFiles(buildLogger)
        } catch (t: Throwable) {
            val msg = ("Error processing dotCover reported source files path. " +
                    "No source code will be included into report. " + t.message)
            LOG.warn(msg, t)
            buildLogger.warning(msg)
            _files.clear()
        }

        if (LOG.isDebugEnabled) {
            LOG.debug("Found the following source files to include into dotCover report: " + TreeSet(_files.values))
        }
    }