本文整理汇总了Java中org.sonar.api.resources.Language类的典型用法代码示例。如果您正苦于以下问题:Java Language类的具体用法?Java Language怎么用?Java Language使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Language类属于org.sonar.api.resources包,在下文中一共展示了Language类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: define
import org.sonar.api.resources.Language; //导入依赖的package包/类
@Override
public void define(Context context) {
for (Language language : languages.all()) {
NewRepository repo = context
.createRepository(getRepositoryName(language.getKey()), language.getKey());
repo.setName("Coverage evolution");
repo.createRule(decreasingLineCoverageRule)
.setName("Line-coverage on files should not decrease")
.setMarkdownDescription("Reports if the line-coverage on a file has decreased.")
.setTags("bad-practice")
.setSeverity(Severity.BLOCKER)
;
repo.createRule(decreasingOverallLineCoverageRule)
.setName("Project-wide line-coverage should not decrease")
.setMarkdownDescription("Reports if the line-coverage on the project has decreased.")
.setTags("bad-practice")
.setSeverity(Severity.BLOCKER)
;
repo.done();
}
}
示例2: testLanguage
import org.sonar.api.resources.Language; //导入依赖的package包/类
private static Language testLanguage(String name) {
return new Language() {
@Override
public String getKey() {
return name;
}
@Override
public String getName() {
return name;
}
@Override
public String[] getFileSuffixes() {
return new String[0];
}
};
}
示例3: getLanguage
import org.sonar.api.resources.Language; //导入依赖的package包/类
@Override
public Language getLanguage() {
return tanaguru;
}
示例4: getLanguage
import org.sonar.api.resources.Language; //导入依赖的package包/类
@Override
public Language getLanguage() {
return language;
}
示例5: getLanguage
import org.sonar.api.resources.Language; //导入依赖的package包/类
public Language getLanguage() {
return language;
}
示例6: getLanguage
import org.sonar.api.resources.Language; //导入依赖的package包/类
/**
* Returns the Apex language.
*
* @return the language.
*/
@Override
public Language getLanguage() {
return language;
}