@Test public void count_extensions_sonarlint() { SonarRuntime runtime = SonarRuntimeImpl.forSonarLint(Version.create(7, 9)); Plugin.Context context = new Plugin.Context(runtime); Plugin underTest = new CssPlugin(); underTest.define(context); assertThat(context.getExtensions()).hasSize(11); }
@Override public void define(Context context) { context.addExtensions( MetricSensor.class, CssLanguage.class, SonarWayProfile.class, CssRulesDefinition.class, CssAnalyzerBundle.class, CssAnalyzerBridgeServer.class, CssRuleSensor.class, StylelintReportSensor.class, MinifiedFilesFilter.class, PropertyDefinition.builder(FILE_SUFFIXES_KEY) .defaultValue(FILE_SUFFIXES_DEFVALUE) .name("File Suffixes") .description("List of suffixes for files to analyze.") .subCategory(GENERAL_SUBCATEGORY) .category(CSS_CATEGORY) .onQualifiers(Qualifiers.PROJECT) .multiValues(true) .build() ); context.addExtension( PropertyDefinition.builder(STYLELINT_REPORT_PATHS) .defaultValue(STYLELINT_REPORT_PATHS_DEFAULT_VALUE) .name("Stylelint Report Files") .description("Paths (absolute or relative) to the JSON files with stylelint issues.") .onQualifiers(Qualifiers.PROJECT) .subCategory(LINTER_SUBCATEGORY) .category(CSS_CATEGORY) .multiValues(true) .build()); }
CssPlugin implements Plugin { @Override public void define(Context context) { context.addExtensions( MetricSensor.class, CssLanguage.class, SonarWayProfile.class, CssRulesDefinition.class, CssAnalyzerBundle.class, CssAnalyzerBridgeServer.class, CssRuleSensor.class, StylelintReportSensor.class, MinifiedFilesFilter.class, PropertyDefinition.builder(FILE_SUFFIXES_KEY) .defaultValue(FILE_SUFFIXES_DEFVALUE) .name("File Suffixes") .description("List of suffixes for files to analyze.") .subCategory(GENERAL_SUBCATEGORY) .category(CSS_CATEGORY) .onQualifiers(Qualifiers.PROJECT) .multiValues(true) .build() ); context.addExtension( PropertyDefinition.builder(STYLELINT_REPORT_PATHS) .defaultValue(STYLELINT_REPORT_PATHS_DEFAULT_VALUE) .name("Stylelint Report Files") .description("Paths (absolute or relative) to the JSON files with stylelint issues.") .onQualifiers(Qualifiers.PROJECT) .subCategory(LINTER_SUBCATEGORY) .category(CSS_CATEGORY) .multiValues(true) .build()); } }
CssPlugin implements Plugin { @Override public void define(Context context) { context.addExtensions( MetricSensor.class, CssLanguage.class, SonarWayProfile.class, CssRulesDefinition.class, CssAnalyzerBundle.class, CssAnalyzerBridgeServer.class, CssRuleSensor.class, StylelintReportSensor.class, MinifiedFilesFilter.class, PropertyDefinition.builder(FILE_SUFFIXES_KEY) .defaultValue(FILE_SUFFIXES_DEFVALUE) .name("File Suffixes") .description("List of suffixes for files to analyze.") .subCategory(GENERAL_SUBCATEGORY) .category(CSS_CATEGORY) .onQualifiers(Qualifiers.PROJECT) .multiValues(true) .build() ); context.addExtension( PropertyDefinition.builder(STYLELINT_REPORT_PATHS) .defaultValue(STYLELINT_REPORT_PATHS_DEFAULT_VALUE) .name("Stylelint Report Files") .description("Paths (absolute or relative) to the JSON files with stylelint issues.") .onQualifiers(Qualifiers.PROJECT) .subCategory(LINTER_SUBCATEGORY) .category(CSS_CATEGORY) .multiValues(true) .build()); }  }
CssPlugin implements Plugin { @Override public void define(Context context) { context.addExtensions( MetricSensor.class, CssLanguage.class, SonarWayProfile.class, CssRulesDefinition.class, CssAnalyzerBundle.class, CssAnalyzerBridgeServer.class, CssRuleSensor.class, StylelintReportSensor.class, MinifiedFilesFilter.class, PropertyDefinition.builder(FILE_SUFFIXES_KEY) .defaultValue(FILE_SUFFIXES_DEFVALUE) .name("File Suffixes") .description("List of suffixes for files to analyze.") .subCategory(GENERAL_SUBCATEGORY) .category(CSS_CATEGORY) .onQualifiers(Qualifiers.PROJECT) .multiValues(true) .build() ); context.addExtension( PropertyDefinition.builder(STYLELINT_REPORT_PATHS) .defaultValue(STYLELINT_REPORT_PATHS_DEFAULT_VALUE) .name("Stylelint Report Files") .description("Paths (absolute or relative) to the JSON files with stylelint issues.") .onQualifiers(Qualifiers.PROJECT) .subCategory(LINTER_SUBCATEGORY) .category(CSS_CATEGORY) .multiValues(true) .build()); }  @Override void define(Context context); }
CssPlugin implements Plugin { @Override public void define(Context context) { context.addExtensions( MetricSensor.class, CssLanguage.class, SonarWayProfile.class, CssRulesDefinition.class, CssAnalyzerBundle.class, CssAnalyzerBridgeServer.class, CssRuleSensor.class, StylelintReportSensor.class, MinifiedFilesFilter.class, PropertyDefinition.builder(FILE_SUFFIXES_KEY) .defaultValue(FILE_SUFFIXES_DEFVALUE) .name("File Suffixes") .description("List of suffixes for files to analyze.") .subCategory(GENERAL_SUBCATEGORY) .category(CSS_CATEGORY) .onQualifiers(Qualifiers.PROJECT) .multiValues(true) .build() ); context.addExtension( PropertyDefinition.builder(STYLELINT_REPORT_PATHS) .defaultValue(STYLELINT_REPORT_PATHS_DEFAULT_VALUE) .name("Stylelint Report Files") .description("Paths (absolute or relative) to the JSON files with stylelint issues.") .onQualifiers(Qualifiers.PROJECT) .subCategory(LINTER_SUBCATEGORY) .category(CSS_CATEGORY) .multiValues(true) .build()); }  @Override void define(Context context); static final String FILE_SUFFIXES_DEFVALUE; static final String STYLELINT_REPORT_PATHS; static final String STYLELINT_REPORT_PATHS_DEFAULT_VALUE; static final String FORMER_NODE_EXECUTABLE; }