org.sonar.api.resources.Qualifiers Java Examples

The following examples show how to use org.sonar.api.resources.Qualifiers. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnsibleSettings.java    From sonar-ansible with Apache License 2.0 6 votes vote down vote up
public static List<PropertyDefinition> getProperties() {
    return asList(
            PropertyDefinition.builder(ANSIBLE_LINT_PATH_KEY)
                    .name("Path to ansible-lint")
                    .description("Path to the ansible-lint executable. Leave it empty if the command is in the system path.")
                    .defaultValue(ANSIBLE_LINT_PATH_DEFAULT_VALUE)
                    .category("Ansible")
                    .onQualifiers(Qualifiers.PROJECT)
                    .build(),
            PropertyDefinition.builder(ANSIBLE_LINT_CONF_PATH_KEY)
                    .name("Path the an ansible-lint configuration file")
                    .description("Path (absolute or relative to project root) the an ansible-lint configuration file. Leave it empty to use the default .ansible-lint file.")
                    .defaultValue(ANSIBLE_LINT_CONF_PATH_DEFAULT_VALUE)
                    .category("Ansible")
                    .onQualifiers(Qualifiers.PROJECT)
                    .build());
}
 
Example #2
Source File: AemRulesSonarPlugin.java    From AEM-Rules-for-SonarQube with Apache License 2.0 6 votes vote down vote up
private static List<PropertyDefinition> pluginProperties() {
    return List.of(
        PropertyDefinition.builder(Constants.FILE_EXTENSIONS_PROP_KEY)
            .name("File suffixes")
            .description("List of file suffixes that will be scanned.")
            .category(Htl.NAME)
            .defaultValue(Constants.FILE_EXTENSIONS_DEF_VALUE)
            .onQualifiers(Qualifiers.PROJECT)
            .multiValues(true)
            .build(),
        PropertyDefinition.builder(Constants.HTL_FILES_RELATIVE_PATHS_KEY)
            .name("HTL files relative paths")
            .description("List of relative paths that contains HTL files.")
            .category(Htl.NAME)
            .defaultValue(Constants.HTL_FILES_RELATIVE_PATHS_DEF_VALUE)
            .onQualifiers(Qualifiers.PROJECT)
            .multiValues(true)
            .build()
    );
}
 
Example #3
Source File: LuaPlugin.java    From sonar-lua with GNU Lesser General Public License v3.0 6 votes vote down vote up
@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()
  );
}
 
Example #4
Source File: CheckstylePlugin.java    From sonar-checkstyle with GNU Lesser General Public License v3.0 5 votes vote down vote up
@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(CheckstyleConstants.CHECKER_TAB_WIDTH)
                            .category(CoreProperties.CATEGORY_JAVA)
                            .subCategory(CHECKSTYLE_SUB_CATEGORY_NAME)
                            .name("Tab Width")
                            .description(CHECKER_TAB_WIDTH_DESCRIPTION)
                            .type(PropertyType.INTEGER)
                            .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);
}
 
Example #5
Source File: CommunityBranchPlugin.java    From sonarqube-community-branch-plugin with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void load(CoreExtension.Context context) {
    if (SonarQubeSide.COMPUTE_ENGINE == context.getRuntime().getSonarQubeSide()) {
        context.addExtensions(CommunityReportAnalysisComponentProvider.class, CommunityBranchEditionProvider.class);
    } else if (SonarQubeSide.SERVER == context.getRuntime().getSonarQubeSide()) {
        context.addExtensions(CommunityBranchFeatureExtension.class, CommunityBranchSupportDelegate.class,

                              AlmSettingsWs.class, CountBindingAction.class, DeleteAction.class,
                              DeleteBindingAction.class, ListAction.class, ListDefinitionsAction.class,
                              GetBindingAction.class,

                              CreateGithubAction.class, SetGithubBindingAction.class, UpdateGithubAction.class,

                              CreateAzureAction.class, SetAzureBindingAction.class, UpdateAzureAction.class,

                              CreateBitbucketAction.class, SetBitbucketBindingAction.class,
                              UpdateBitbucketAction.class,

                              CreateGitlabAction.class, SetGitlabBindingAction.class, UpdateGitlabAction.class,

            /* org.sonar.db.purge.PurgeConfiguration uses the value for the this property if it's configured, so it only
            needs to be specified here, but doesn't need any additional classes to perform the relevant purge/cleanup
            */
                              PropertyDefinition
                                      .builder(PurgeConstants.DAYS_BEFORE_DELETING_INACTIVE_BRANCHES_AND_PRS)
                                      .name("Number of days before purging inactive short living branches")
                                      .description(
                                              "Short living branches are permanently deleted when there are no analysis for the configured number of days.")
                                      .category(CoreProperties.CATEGORY_HOUSEKEEPING)
                                      .subCategory(CoreProperties.SUBCATEGORY_GENERAL).defaultValue("30")
                                      .type(PropertyType.INTEGER).build()


                             );

    }

    if (SonarQubeSide.COMPUTE_ENGINE == context.getRuntime().getSonarQubeSide() ||
        SonarQubeSide.SERVER == context.getRuntime().getSonarQubeSide()) {
        context.addExtensions(PropertyDefinition.builder(IMAGE_URL_BASE)
                                      .category(CoreProperties.CATEGORY_GENERAL)
                                      .subCategory(CoreProperties.SUBCATEGORY_GENERAL)
                                      .onQualifiers(Qualifiers.APP)
                                      .name("Images base URL")
                                      .description("Base URL used to load the images for the PR comments (please use this only if images are not displayed properly).")
                                      .type(PropertyType.STRING)
                                      .build());

    }
}
 
Example #6
Source File: RubyPlugin.java    From sonar-ruby-plugin with MIT License 4 votes vote down vote up
public void define(Context context) {

        context.addExtensions(
            PropertyDefinition.builder(FILE_SUFFIXES)
                .name("File Suffixes")
                .description("Comma separated list of Ruby files to analyze.")
                .category(RUBY_CATEGORY)
                .subCategory(GENERAL)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue("rb")
                .build(),

            // SimpleCov
            PropertyDefinition.builder(SIMPLECOV_REPORT_PATH)
                .name("Path to coverage reports")
                .description("Path to coverage reports.")
                .category(RUBY_CATEGORY)
                .subCategory(TEST_AND_COVERAGE)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue("coverage/.resultset.json")
                .build(),

            PropertyDefinition.builder(TEST_FRAMEWORK)
                .name("Name of test framework")
                .description("Name of test framework.")
                .category(RUBY_CATEGORY)
                .subCategory(TEST_AND_COVERAGE)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue("RSpec")
                .build(),

            // RUBOCOP
            PropertyDefinition.builder(RUBOCOP_CONFIG)
                .name("Rubocop configuration")
                .description("Path to the Rubocop configuration file to use in rubocop analysis. Set to empty to use the default.")
                .category(RUBY_CATEGORY)
                .subCategory(RUBOCOP)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue(".rubocop.yml")
                .build(),

            PropertyDefinition.builder(RUBOCOP_BIN)
                .name("Rubocop executable")
                .description("Path to the rubocop executable to use in rubocop analysis. Set to empty to use the default one.")
                .category(RUBY_CATEGORY)
                .subCategory(RUBOCOP)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue("")
                .build(),

            PropertyDefinition.builder(RUBOCOP_FILES_PATH)
                .name("Rubocop files to check")
                .description("The path to the files for rubocop to check")
                .category(RUBY_CATEGORY)
                .subCategory(RUBOCOP)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue(".")
                .build(),

            PropertyDefinition.builder(RUBOCOP_REPORT_PATH)
                .name("Rubocop's reports")
                .description("Path to Rubocop's report file, relative to projects root")
                .category(RUBY_CATEGORY)
                .subCategory(RUBOCOP)
                .onQualifiers(Qualifiers.PROJECT)
                .defaultValue("rubocop-result.json")
                .build(),

            RubyRuleProfile.class,
            Ruby.class,
            RubyRulesDefinition.class,
            RubocopSensor.class,

            PathResolver.class,
            RubocopExecutor.class,
            RubocopParser.class,
            RubyMetricsSensor.class,

            SimpleCovSensor.class,
            SimpleCovParser.class,
            CombinedCoverageSensor.class
        );
    }
 
Example #7
Source File: FlowLanguageProperties.java    From sonar-flow-plugin with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Get the list of language properties.
 * @return list of properties
 */
public static List<Object> getProperties() {
  ImmutableList.Builder<Object> props = ImmutableList.builder();
  props.add(
      PropertyDefinition.builder(FLOW_FILE_SUFFIXES_KEY).defaultValue(FLOW_FILE_SUFFIXES_DEFVALUE)
          .name("Flow file suffixes")
          .type(PropertyType.STRING)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_FLOW)
          .description("Comma-separated list extensions for flow files to analyze.")
          .onQualifiers(Qualifiers.PROJECT).build())
      .add(
      PropertyDefinition.builder(NODE_FILE_SUFFIXES_KEY).defaultValue(NODE_FILE_SUFFIXES_DEFVALUE)
          .name("Node file suffixes")
          .type(PropertyType.STRING)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_NODE)
          .description("Comma-separated list of extensions for node files to analyze.")
          .onQualifiers(Qualifiers.PROJECT).build())
      .add(
      PropertyDefinition.builder(FLOW_FILE_FILTER_KEY).defaultValue(FLOW_FILE_FILTER_DEFVALUE)
          .name("Flow file pattern")
          .type(PropertyType.REGULAR_EXPRESSION)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_FLOW)
          .description("Regex pattern for flow files to analyze.")
          .onQualifiers(Qualifiers.PROJECT).build())
      .add(
      PropertyDefinition.builder(NODE_FILE_FILTER_KEY).defaultValue(NODE_FILE_FILTER_DEFVALUE)
          .name("Node file patterns")
          .type(PropertyType.REGULAR_EXPRESSION)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_NODE)
          .description("Regex patterns for node files to analyze.")
          .onQualifiers(Qualifiers.PROJECT).build(),
      PropertyDefinition.builder(IGNORE_TOPLEVEL_KEY).defaultValue(IGNORE_TOPLEVEL_DEFVALUE)
          .name("Ignore top-level services")
          .type(PropertyType.BOOLEAN)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_CHECKS)
          .description("Ignore top-level service checks")
          .onQualifiers(Qualifiers.PROJECT).build())
      .add(
      PropertyDefinition.builder(FAIL_ON_SCANERROR).defaultValue(FAIL_ON_SCANERROR_DEFVALUE)
          .name("Fail on scan error")
          .type(PropertyType.BOOLEAN)
          .category(FLOW_CATEGORY)
          .subCategory(FLOW_SUBCATEGORY_SCANNER)
          .description("Scanning process fails when a scanning a single file fails")
          .onQualifiers(Qualifiers.PROJECT).build());
  return props.build();
}
 
Example #8
Source File: EsqlPlugin.java    From sonar-esql-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public void define(Context context) {
	context.addExtensions(
			EsqlLanguage.class,
			EsqlSensor.class,
			EsqlExclusionsFileFilter.class,
			EsqlRulesDefinition.class,
			EsqlProfilesDefinition.class,
			EsqlMetrics.class);

	  context.addExtensions(
		PropertyDefinition.builder(EsqlLanguage.FILE_SUFFIXES_KEY)
		        .defaultValue(EsqlLanguage.FILE_SUFFIXES_DEFVALUE)
		        .name(FILE_SUFFIXES_NAME)
		        .description(FILE_SUFFIXES_DESCRIPTION)
		        .subCategory(GENERAL)
		        .category(ESQL_CATEGORY)
		        .multiValues(true)
		        .onQualifiers(Qualifiers.PROJECT)
		        .build(),
		      
      PropertyDefinition.builder(EsqlPlugin.IGNORE_HEADER_COMMENTS)
        .defaultValue(EsqlPlugin.IGNORE_HEADER_COMMENTS_DEFAULT_VALUE.toString())
        .name("Ignore header comments")
        .description("True to not count file header comments in comment metrics.")
        .onQualifiers(Qualifiers.PROJECT)
        .subCategory(GENERAL)
        .category(ESQL_CATEGORY)
        .type(PropertyType.BOOLEAN)
        .build(),

       PropertyDefinition.builder(TRACE_PATHS_PROPERTY)
		      .defaultValue(TRACE_PATHS_DEFAULT_VALUE)
		      .category("Esql")
		      .subCategory("Trace")
		      .name("IIB trace file")
		      .description("Path to the IIB trace files containing coverage data. The path may be absolute or relative to the project base directory.")
		      .onQualifiers(Qualifiers.PROJECT)
		      .multiValues(true)
		      .build(),

	  PropertyDefinition.builder(EsqlPlugin.ESQL_EXCLUSIONS_KEY)
			  .defaultValue(ESQL_EXCLUSIONS_DEFAULT_VALUE)
			  .name("ESQL Exclusions")
			  .description("List of file path patterns to be excluded from analysis of ESQL files.")
			  .onQualifiers(Qualifiers.PROJECT)
			  .subCategory(GENERAL)
			  .multiValues(true)
			  .category(ESQL_CATEGORY)
			  .build()
		);

}
 
Example #9
Source File: GerritPlugin.java    From sonar-gerrit-plugin with Apache License 2.0 4 votes vote down vote up
@Override
public void define(Context context) {
    PropertyDefinition enabled = PropertyDefinition.builder(PropertyKey.GERRIT_ENABLED)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.BOOLEAN).defaultValue(GerritConstants.GERRIT_ENABLED_DEFAULT)
        .onQualifiers(Arrays.asList(Qualifiers.PROJECT)).index(serverBaseIndex++).build();

    PropertyDefinition scheme = PropertyDefinition.builder(PropertyKey.GERRIT_SCHEME)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.SINGLE_SELECT_LIST)
        .options(GerritConstants.SCHEME_HTTP, GerritConstants.SCHEME_HTTPS, GerritConstants.SCHEME_SSH)
        .defaultValue(GerritConstants.SCHEME_HTTP).index(serverBaseIndex++).build();

    PropertyDefinition host = PropertyDefinition.builder(PropertyKey.GERRIT_HOST)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .index(serverBaseIndex++).build();

    PropertyDefinition port = PropertyDefinition.builder(PropertyKey.GERRIT_PORT)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.INTEGER).defaultValue("80").index(serverBaseIndex++).build();

    PropertyDefinition username = PropertyDefinition.builder(PropertyKey.GERRIT_USERNAME)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .index(serverBaseIndex++).build();

    PropertyDefinition password = PropertyDefinition.builder(PropertyKey.GERRIT_PASSWORD)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.PASSWORD).index(serverBaseIndex++).build();

    PropertyDefinition sshKeyPath = PropertyDefinition.builder(PropertyKey.GERRIT_SSH_KEY_PATH)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.STRING).index(serverBaseIndex++).build();

    PropertyDefinition strictHostkey = PropertyDefinition.builder(PropertyKey.GERRIT_STRICT_HOSTKEY)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.BOOLEAN).defaultValue(GerritConstants.GERRIT_STRICT_HOSTKEY_DEFAULT)
        .index(serverBaseIndex++).build();

    PropertyDefinition authScheme = PropertyDefinition.builder(PropertyKey.GERRIT_HTTP_AUTH_SCHEME)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .type(PropertyType.SINGLE_SELECT_LIST).options(GerritConstants.AUTH_BASIC, GerritConstants.AUTH_DIGEST)
        .defaultValue(GerritConstants.AUTH_DIGEST).index(serverBaseIndex++).build();

    PropertyDefinition basePath = PropertyDefinition.builder(PropertyKey.GERRIT_BASE_PATH)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_SERVER)
        .defaultValue("/").index(serverBaseIndex++).build();

    PropertyDefinition label = PropertyDefinition.builder(PropertyKey.GERRIT_LABEL)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .defaultValue("Code-Review").index(reviewBaseIndex++).build();

    PropertyDefinition message = PropertyDefinition.builder(PropertyKey.GERRIT_MESSAGE)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .defaultValue("Sonar review at ${sonar.host.url}").index(reviewBaseIndex++).build();

    PropertyDefinition newIssuesOnly = PropertyDefinition.builder(PropertyKey.GERRIT_COMMENT_NEW_ISSUES_ONLY)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .type(PropertyType.BOOLEAN).defaultValue(GerritConstants.GERRIT_COMMENT_NEW_ISSUES_ONLY)
        .onQualifiers(Arrays.asList(Qualifiers.PROJECT)).index(reviewBaseIndex++).build();

    PropertyDefinition threshold = PropertyDefinition.builder(PropertyKey.GERRIT_THRESHOLD)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .type(PropertyType.SINGLE_SELECT_LIST)
        .options(Severity.INFO.toString(), Severity.MINOR.toString(), Severity.MAJOR.toString(),
            Severity.CRITICAL.toString(), Severity.BLOCKER.toString())
        .defaultValue(Severity.INFO.toString()).onQualifiers(Arrays.asList(Qualifiers.PROJECT))
        .index(reviewBaseIndex++).build();

    PropertyDefinition voteNoIssue = PropertyDefinition.builder(PropertyKey.GERRIT_VOTE_NO_ISSUE)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .type(PropertyType.SINGLE_SELECT_LIST).options("+1", "+2")
        .defaultValue(GerritConstants.GERRIT_VOTE_NO_ISSUE_DEFAULT)
        .onQualifiers(Arrays.asList(Qualifiers.PROJECT)).index(reviewBaseIndex++).build();

    PropertyDefinition voteIssueBelowThreshold = PropertyDefinition
        .builder(PropertyKey.GERRIT_VOTE_ISSUE_BELOW_THRESHOLD).category(GerritConstants.GERRIT_CATEGORY)
        .subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW).type(PropertyType.SINGLE_SELECT_LIST)
        .options("-2", "-1", "0", "+1", "+2")
        .defaultValue(GerritConstants.GERRIT_VOTE_ISSUE_BELOW_THRESHOLD_DEFAULT)
        .onQualifiers(Arrays.asList(Qualifiers.PROJECT)).index(reviewBaseIndex++).build();

    PropertyDefinition voteIssueAboveThreshold = PropertyDefinition
        .builder(PropertyKey.GERRIT_VOTE_ISSUE_ABOVE_THRESHOLD).category(GerritConstants.GERRIT_CATEGORY)
        .subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW).type(PropertyType.SINGLE_SELECT_LIST)
        .options("-2", "-1", "0").defaultValue(GerritConstants.GERRIT_VOTE_ISSUE_ABOVE_THRESHOLD_DEFAULT)
        .onQualifiers(Arrays.asList(Qualifiers.PROJECT)).index(reviewBaseIndex++).build();

    PropertyDefinition issueComment = PropertyDefinition.builder(PropertyKey.GERRIT_ISSUE_COMMENT)
        .category(GerritConstants.GERRIT_CATEGORY).subCategory(GerritConstants.GERRIT_SUBCATEGORY_REVIEW)
        .defaultValue(
            "[${issue.isNew}] New: ${issue.ruleKey} Severity: ${issue.severity}, Message: ${issue.message}")
        .index(reviewBaseIndex++).build();

    context.addExtensions(Arrays.asList(GerritConfiguration.class, GerritConnectorFactory.class,
        GerritFacadeFactory.class, GerritInitializer.class, GerritProjectBuilder.class, GerritPostJob.class,
        enabled, scheme, host, port, username, password, authScheme,
        basePath, sshKeyPath, strictHostkey, label, message, newIssuesOnly, threshold, voteNoIssue,
        voteIssueBelowThreshold, voteIssueAboveThreshold, issueComment));
}