本文整理了Java中org.sonar.api.resources.File.setQualifier()
方法的一些代码示例,展示了File.setQualifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。File.setQualifier()
方法的具体详情如下:
包路径:org.sonar.api.resources.File
类名称:File
方法名:setQualifier
暂无
代码示例来源:origin: octo-technology/sonar-objective-c
public Resource getUnitTestResource(String filename) {
org.sonar.api.resources.File sonarFile = new org.sonar.api.resources.File(filename);
sonarFile.setQualifier(Qualifiers.UNIT_TEST_FILE);
return sonarFile;
}
}
代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api
/**
* Internal use only.
* @deprecated since 5.1 use {@link FileSystem#inputFile(org.sonar.api.batch.fs.FilePredicate)}
*/
@Deprecated
public static File create(String relativePathFromBasedir, Language language, boolean unitTest) {
File file = create(relativePathFromBasedir);
file.setLanguage(language);
if (unitTest) {
file.setQualifier(Qualifiers.UNIT_TEST_FILE);
}
return file;
}
代码示例来源:origin: org.codehaus.sonar/sonar-batch
private File getTestResource(InputFile testFile) {
File testRes = File.create(testFile.relativePath());
testRes.setQualifier(Qualifiers.UNIT_TEST_FILE);
// Reload
testRes = sonarIndex.getResource(testRes);
if (testRes == null) {
throw new IllegalArgumentException("Provided input file is not indexed or not a test file: " + testFile);
}
return testRes;
}
内容来源于网络,如有侵权,请联系作者删除!