Examples of predicates()


Examples of org.sonar.api.batch.fs.FileSystem.predicates()

  private void processLine(File coverPerTest, int lineNumber, SensorContext context, String line, InputFile file) {
    try {
      Iterator<String> split = Splitter.on(":").split(line).iterator();
      String otherFileRelativePath = split.next();
      FileSystem fs = context.fileSystem();
      InputFile otherFile = fs.inputFile(fs.predicates().hasRelativePath(otherFileRelativePath));
      if (otherFile == null) {
        throw new IllegalStateException("Unable to find file " + otherFileRelativePath);
      }
      int weight = Integer.parseInt(split.next());
      context.newDependency()
View Full Code Here

Examples of org.sonar.api.batch.fs.FileSystem.predicates()

  }

  @Override
  public void execute(SensorContext context) {
    FileSystem fs = context.fileSystem();
    FilePredicates p = fs.predicates();
    for (InputFile file : fs.inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(InputFile.Type.MAIN)))) {
      processDependencies(file, context);
    }
  }
}
View Full Code Here

Examples of org.sonar.api.batch.fs.FileSystem.predicates()

  }

  @Override
  public void execute(SensorContext context) {
    FileSystem fs = context.fileSystem();
    FilePredicates p = fs.predicates();
    for (InputFile file : fs.inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(InputFile.Type.TEST)))) {
      processFileTestPlan(file, context);
    }
  }
}
View Full Code Here

Examples of org.sonar.api.batch.fs.FileSystem.predicates()

    try {
      Iterator<String> split = Splitter.on(":").split(line).iterator();
      String testCaseName = split.next();
      String mainFileRelativePath = split.next();
      FileSystem fs = context.fileSystem();
      InputFile mainFile = fs.inputFile(fs.predicates().hasRelativePath(mainFileRelativePath));
      if (mainFile == null) {
        throw new IllegalStateException("Unable to find file " + mainFileRelativePath);
      }
      List<Integer> coveredLines = new ArrayList<Integer>();
      Iterator<String> lines = Splitter.on(",").split(split.next()).iterator();
View Full Code Here

Examples of org.sonar.api.batch.fs.FileSystem.predicates()

  }

  @Override
  public void execute(SensorContext context) {
    FileSystem fs = context.fileSystem();
    FilePredicates p = fs.predicates();
    for (InputFile file : fs.inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(InputFile.Type.TEST)))) {
      processCoveragePerTest(file, context);
    }
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.