本文整理汇总了Java中org.sonar.api.resources.Project.isRoot方法的典型用法代码示例。如果您正苦于以下问题:Java Project.isRoot方法的具体用法?Java Project.isRoot怎么用?Java Project.isRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sonar.api.resources.Project
的用法示例。
在下文中一共展示了Project.isRoot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyse
import org.sonar.api.resources.Project; //导入方法依赖的package包/类
@Override
public void analyse(Project module, SensorContext context) {
for (InputFile file : fileSystem.inputFiles(fileSystem.predicates().doesNotMatchPathPatterns(config.coverageExclusions()))) {
analyseFile(module, context, file);
}
// We assume the root module is always the last module, so that the overall data is correct
if (module.isRoot()) {
analyseRootProject(module);
}
}
示例2: shouldExecuteOnProject
import org.sonar.api.resources.Project; //导入方法依赖的package包/类
@Override
public boolean shouldExecuteOnProject(Project aProject) {
return aProject.isRoot();
}
示例3: executeOn
import org.sonar.api.resources.Project; //导入方法依赖的package包/类
public void executeOn(Project aProject, SensorContext aSensorContext) {
if (aProject.isRoot()) {
LOGGER.info("Collecting metrics after analysis");
for (Measure theMeasure : aSensorContext.getMeasures(aProject, new GetOnlyDirectMeasures())) {
String theKey = theMeasure.getMetricKey();
persister.registerMetricKeyWithDescription(theKey, theMeasure.getMetric().getDescription());
LOGGER.debug("Got new data for metric {}", theKey);
Double theValue = theMeasure.getValue();
persister.logAfterAnalysis(theKey, theValue);
}
persister.writeReportsTo(fileSystem, settings);
} else {
LOGGER.info("Skipping report for {} as it is not the root", aProject);
}
}
示例4: shouldExecuteOnProject
import org.sonar.api.resources.Project; //导入方法依赖的package包/类
public boolean shouldExecuteOnProject(Project project) {
if (missingMandatoryParameters()) {
LOG.info("JIRA issues sensor will not run as some parameters are missing.");
}
return project.isRoot() && !missingMandatoryParameters();
}