zoukankan      html  css  js  c++  java
  • CoverageBuilder

    public CoverageBuilder(String gitPath, String newBranchName, String oldBranchName, List<String> exclusionList) {
    this.classes = new HashMap<String, IClassCoverage>();
    this.sourcefiles = new HashMap<String, ISourceFileCoverage>();
    List<ClassInfo> classInfoList = CodeDiff.diffBranchToBranch(gitPath, newBranchName, oldBranchName);
    if(exclusionList != null && !exclusionList.isEmpty()){
    List<Pattern> nameList = new ArrayList<Pattern>();
    List<Pattern> packageList = new ArrayList<Pattern>();
    for(String item : exclusionList){
    item = RegExUtils.removeAll(item, "\*\*\/");
    item = RegExUtils.removeAll(item, "\/\*\*");
    if(StringUtils.endsWith(item, ".java")||StringUtils.endsWith(item,".class")){
    nameList.add(Pattern.compile(RegExUtils.replaceAll(StringUtils.remove(StringUtils.remove(item, ".java"), ".class"), "\*", ".*")));
    } else {
    packageList.add(Pattern.compile(RegExUtils.replaceAll(item, "\*", ".*")));
    }
    }
    for (int i = classInfoList.size() -1; i >=0; i--) {
    if(excludeClass(classInfoList.get(i), packageList, nameList)){
    exclusionList.remove(i);
    }
    }
    }
    classInfos = classInfoList;
    }
  • 相关阅读:
    C++的Socket的使用源码
    一些程序技术简介
    VMware安装步骤既常见问题
    操作系统和环境准备
    第一章-硬件组成
    python之面向对象
    指向方法之委托(一)
    Django之URL控制器(路由层)
    python之字符编码(四)
    python之字符编码(三)
  • 原文地址:https://www.cnblogs.com/exmyth/p/13366267.html
Copyright © 2011-2022 走看看