本文整理汇总了Java中org.sonar.api.resources.Qualifiers类的典型用法代码示例。如果您正苦于以下问题:Java Qualifiers类的具体用法?Java Qualifiers怎么用?Java Qualifiers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Qualifiers类属于org.sonar.api.resources包,在下文中一共展示了Qualifiers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: define
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public void define(Context context) {
context.addExtensions(
PropertyDefinition.builder(FILE_SUFFIXES_KEY)
.name("File Suffixes")
.description("Comma-separated list of suffixes of 1C 7.7 Enterprise files to analyze.")
.subCategory(GENERAL)
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("1s")
.build(),
OneC.class,
OneCSensor.class,
OneCQualityProfile.class
);
}
示例2: definitions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
/**
* Property definitions.
*
* @return property definitions
*/
public static List<PropertyDefinition> definitions() {
final PropertyDefinition issueMode = PropertyDefinition.builder(ISSUE_MODE_KEY).name("Issue mode")
.description(
"How to report issues (only on packages, on packages and fallback to classes, only on classes)")
.category(CATEGORY).type(PropertyType.SINGLE_SELECT_LIST)
.options(ISSUE_MODE_PACKAGE, ISSUE_MODE_FALLBACK, ISSUE_MODE_CLASS).defaultValue(ISSUE_MODE_FALLBACK)
.index(100).onQualifiers(Qualifiers.PROJECT).build();
final PropertyDefinition classMode = PropertyDefinition.builder(CLASS_MODE_KEY).name("Class mode")
.description(
"How to report issues when using class modes (on all classes, on the first class in the package)")
.category(CATEGORY).type(PropertyType.SINGLE_SELECT_LIST).options(CLASS_MODE_ALL, CLASS_MODE_FIRST)
.defaultValue(CLASS_MODE_ALL).index(200).onQualifiers(Qualifiers.PROJECT).build();
return Arrays.asList(issueMode, classMode);
}
示例3: define
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public void define(Context context) {
context.addExtensions(
VersiondebtSensor.class,
VersiondebtMetrics.class,
VersiondebtDashboardWidget.class,
PropertyDefinition.builder(VERSIONDEBT_REPORT_PATH)
.category(CoreProperties.CATEGORY_JAVA)
.subCategory("Versiondebt")
.name("Report path")
.description("Path (absolute or relative) to versiondebt xml file.")
.defaultValue("target/versiondebt.xml")
.onQualifiers(Qualifiers.PROJECT)
.build()
);
}
示例4: getExtensions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public List getExtensions() {
return ImmutableList.of(
PropertyDefinition.builder(FILE_SUFFIXES_KEY)
.name("File Suffixes")
.description("Comma-separated list of suffixes of Puppet files to analyze.")
.category("Puppet")
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("pp")
.build(),
Puppet.class,
PuppetCpdMapping.class,
PuppetProfile.class,
PuppetSquidSensor.class,
PuppetRuleRepository.class,
PuppetCommonRulesEngine.class
);
}
示例5: getExtensions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public List getExtensions() {
List extensionList = new ArrayList();
extensionList.add(KarmaJunitReporterJsTestDriverSensor.class);
//Add support for parameters
extensionList.add(PropertyDefinition.builder(REPORTS_PATH)
.defaultValue(REPORTS_PATH_DEFAULT_VALUE)
.name("JSTestDriver output folder")
.description("Folder where JsTestDriver unit test reports are located.")
.onQualifiers(Qualifiers.MODULE, Qualifiers.PROJECT)
.subCategory(TEST_AND_COVERAGE)
.build());
return extensionList;
}
示例6: setup
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Before
public void setup(){
mockSession = mock(DatabaseSession.class);
mockSetting = mock(Settings.class);
mockContext = mock(DecoratorContext.class);
mockContext2 = mock(DecoratorContext.class);
project = new Project("Project test");
project.setId(1);
resource = mock(Resource.class);
when(resource.getQualifier()).thenReturn(
"NOT_" + Qualifiers.UNIT_TEST_FILE);
when(resource.getScope()).thenReturn("PRJ");
trophiesDecorator = new TrophiesDecorator(mockSession, project, mockSetting);
utsResource = mock(Resource.class);
when(utsResource.getQualifier()).thenReturn(Qualifiers.UNIT_TEST_FILE);
}
示例7: setUp
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
project = new Project("test");
session = mock(DatabaseSession.class);
settings = mock(Settings.class);
scoreDecorator = new PointsDecorator(session, project, settings);
mockContext = mock(DecoratorContext.class);
mockContext2 = mock(DecoratorContext.class);
ncloc = mock(Measure.class);
classes = mock(Measure.class);
rulesCompliance = mock(Measure.class);
api = mock(Measure.class);
coverage = mock(Measure.class);
tangle = mock(Measure.class);
resource = mock(Resource.class);
when(resource.getQualifier()).thenReturn(
"NOT_" + Qualifiers.UNIT_TEST_FILE);
utsResource = mock(Resource.class);
when(utsResource.getQualifier()).thenReturn(Qualifiers.UNIT_TEST_FILE);
}
示例8: define
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public void define(Context context) {
context.addExtensions(
Lua.class,
LuaSquidSensor.class,
CoberturaSensor.class,
LuaRulesDefinition.class,
LuaProfile.class,
PropertyDefinition.builder(FILE_SUFFIXES_KEY)
.defaultValue(Lua.DEFAULT_FILE_SUFFIXES)
.name("File suffixes")
.description("Comma-separated list of suffixes for files to analyze. To not filter, leave the list empty.")
.onQualifiers(Qualifiers.MODULE, Qualifiers.PROJECT)
.build(),
PropertyDefinition.builder(COBERTURA_REPORT_PATH)
.name("Cobertura xml report path")
.description("Path to the Cobertura coverage report file. The path may be either absolute or relative to the project base directory.")
.onQualifiers(Qualifiers.MODULE, Qualifiers.PROJECT)
.build()
);
}
示例9: getExtensions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public List getExtensions() {
return Arrays
.asList(PropertyDefinition.builder(CheckstyleConstants.CHECKER_FILTERS_KEY)
.defaultValue(CheckstyleConstants.CHECKER_FILTERS_DEFAULT_VALUE)
.category(CoreProperties.CATEGORY_JAVA)
.subCategory(CHECKSTYLE_SUB_CATEGORY_NAME)
.name("Checker Filters")
.description(CHECKER_FILTERS_DESCRIPTION)
.type(PropertyType.TEXT)
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE).build(),
PropertyDefinition.builder(CheckstyleConstants.TREEWALKER_FILTERS_KEY)
.defaultValue(CheckstyleConstants.TREEWALKER_FILTERS_DEFAULT_VALUE)
.category(CoreProperties.CATEGORY_JAVA)
.subCategory(CHECKSTYLE_SUB_CATEGORY_NAME)
.name("Treewalker Filters")
.description(TREEWALKER_FILTERS_DESCRIPTION)
.type(PropertyType.TEXT)
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE).build(),
PropertyDefinition.builder(CheckstyleConfiguration.PROPERTY_GENERATE_XML)
.defaultValue("false").category(CoreProperties.CATEGORY_JAVA)
.subCategory(CHECKSTYLE_SUB_CATEGORY_NAME)
.name("Generate XML Report").type(PropertyType.BOOLEAN).hidden()
.build(),
CheckstyleSensor.class, CheckstyleConfiguration.class,
CheckstyleExecutor.class, CheckstyleAuditListener.class,
CheckstyleProfileExporter.class, CheckstyleProfileImporter.class,
CheckstyleRulesDefinition.class);
}
示例10: definitions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
/**
* Property definitions.
*
* @return property definitions
*/
public static List<PropertyDefinition> definitions() {
return Arrays.asList(PropertyDefinition.builder(WEIGTHS_KEY).name("Issue weights")
.description("Relative weiths of issues based on severity (blocker,critical,major,minor,info)")
.category(CATEGORY).defaultValue("10,5,3,1,0").index(100).onQualifiers(Qualifiers.PROJECT).build(),
PropertyDefinition.builder(RATINGS_KEY).name("Rating")
.description(
"Rating (ranging from A (very good) to E (very bad)). This setting define the values for A through D with E being below the last value.")
.category(CATEGORY).defaultValue("97,92,85,75").index(200).onQualifiers(Qualifiers.PROJECT)
.build());
}
示例11: getExtensions
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public List<Object> getExtensions() {
return ImmutableList.of(
FlowLanguage.class,
FlowProfile.class,
FlowSquidSensor.class,
FlowRulesDefinition.class,
PropertyDefinition.builder(FILE_SUFFIXES_KEY)
.defaultValue(FILE_SUFFIXES_DEFVALUE)
.name("File Suffixes")
.description("Comma-separated list of suffixes for files to analyze.")
.onQualifiers(Qualifiers.PROJECT)
.build(),
PropertyDefinition.builder(IGNORE_TOPLEVEL_KEY)
.defaultValue(IGNORE_TOPLEVEL_DEFVALUE)
.name("Ignore top-level services")
.description("Ignore top-level service checks")
.onQualifiers(Qualifiers.PROJECT)
.build(),
PropertyDefinition.builder(FAIL_ON_SCANERROR)
.defaultValue(FAIL_ON_SCANERROR_DEFVALUE)
.name("Fail on scan error")
.description("Scanning process fails when a scanning a single file fails")
.onQualifiers(Qualifiers.PROJECT)
.build()
);
}
示例12: pluginProperties
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
private static ImmutableList<PropertyDefinition> pluginProperties() {
return ImmutableList.of(
PropertyDefinition.builder(FILE_SUFFIXES_KEY)
.name("File suffixes")
.description("List of file suffixes that will be scanned.")
.category(CATEGORY)
.defaultValue(FILE_SUFFIXES_DEFVALUE)
.onQualifiers(Qualifiers.PROJECT)
.build()
);
}
示例13: getProperties
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
public static List<PropertyDefinition> getProperties() {
return Arrays.asList(
PropertyDefinition.builder(USER_PROP_KEY)
.name("Username")
.description("Username to be used for SVN server or SVN+SSH authentication")
.type(PropertyType.STRING)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_SCM)
.subCategory(CATEGORY_SVN)
.index(0)
.build(),
PropertyDefinition.builder(PASSWORD_PROP_KEY)
.name("Password")
.description("Password to be used for SVN server or SVN+SSH authentication")
.type(PropertyType.PASSWORD)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_SCM)
.subCategory(CATEGORY_SVN)
.index(1)
.build(),
PropertyDefinition.builder(PRIVATE_KEY_PATH_PROP_KEY)
.name("Path to private key file")
.description("Can be used instead of password for SVN+SSH authentication")
.type(PropertyType.STRING)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_SCM)
.subCategory(CATEGORY_SVN)
.index(2)
.build(),
PropertyDefinition.builder(PASSPHRASE_PROP_KEY)
.name("Passphrase")
.description("Optional passphrase of your private key file")
.type(PropertyType.PASSWORD)
.onQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_SCM)
.subCategory(CATEGORY_SVN)
.index(3)
.build());
}
示例14: deprecatedPropertyDefinition
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
private static PropertyDefinition deprecatedPropertyDefinition(String oldKey) {
return PropertyDefinition
.builder(oldKey)
.name(deprecatedName(oldKey))
.description(DEPRECATED_DESCRIPTION)
.category(CATEGORY)
.subCategory(DEPRECATED_SUBCATEGORY)
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
.build();
}
示例15: define
import org.sonar.api.resources.Qualifiers; //导入依赖的package包/类
@Override
public void define(Context context) {
context.addExtensions(
PropertyDefinition.builder(XmlPlugin.FILE_SUFFIXES_KEY)
.name("File suffixes")
.description("Comma-separated list of suffixes for files to analyze.")
.defaultValue(".xml,.xsd,.xsl")
.category("XML")
.onQualifiers(Qualifiers.PROJECT)
.build(),
Xml.class,
XmlRulesDefinition.class,
XmlSonarWayProfile.class,
XmlSensor.class);
}