Class CoverageReportScanner

  • All Implemented Interfaces:
    FilePath.FileCallable<io.jenkins.plugins.util.AgentFileVisitor.FileVisitorResult<ModuleNode>>, Serializable, org.jenkinsci.remoting.RoleSensitive

    public class CoverageReportScanner
    extends io.jenkins.plugins.util.AgentFileVisitor<ModuleNode>
    Scans the workspace for coverage reports that match a specified Ant file pattern and parse these files with the specified parser. Creates a new ModuleNode for each parsed file. For files that cannot be read, an empty module node will be returned.
    Ullrich Hafner
    See Also:
    Serialized Form
    • Constructor Detail

      • CoverageReportScanner

        public CoverageReportScanner​(String filePattern,
                                     String encoding,
                                     boolean followSymbolicLinks,
                                     CoverageTool.Parser parser)
        Creates a new instance of CoverageReportScanner.
        filePattern - ant file-set pattern to scan for files to parse
        encoding - encoding of the files to parse
        followSymbolicLinks - if the scanner should traverse symbolic links
        parser - the parser to use
    • Method Detail

      • processFile

        protected Optional<ModuleNode> processFile​(Path file,
                                                   Charset charset,
        Specified by:
        processFile in class io.jenkins.plugins.util.AgentFileVisitor<ModuleNode>