@Test public void custom_file_suffixes() { Settings settings = new Settings(); settings.setProperty("sonar.css.file.suffixes", "css,css3"); CssLanguage language = new CssLanguage(settings); assertThat(language.getFileSuffixes()).containsOnly("css", "css3"); }
@Override public String[] getFileSuffixes() { String[] suffixes = settings.getStringArray(Plugin.CSS_FILE_SUFFIXES_KEY); if (suffixes == null || suffixes.length == 0) { suffixes = StringUtils.split(Plugin.CSS_FILE_SUFFIXES_DEFAULT_VALUE, ","); } return suffixes; }
CssLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = settings.getStringArray(Plugin.CSS_FILE_SUFFIXES_KEY); if (suffixes == null || suffixes.length == 0) { suffixes = StringUtils.split(Plugin.CSS_FILE_SUFFIXES_DEFAULT_VALUE, ","); } return suffixes; } }
CssLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = settings.getStringArray(Plugin.CSS_FILE_SUFFIXES_KEY); if (suffixes == null || suffixes.length == 0) { suffixes = StringUtils.split(Plugin.CSS_FILE_SUFFIXES_DEFAULT_VALUE, ","); } return suffixes; } CssLanguage(Settings settings); }
CssLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = settings.getStringArray(Plugin.CSS_FILE_SUFFIXES_KEY); if (suffixes == null || suffixes.length == 0) { suffixes = StringUtils.split(Plugin.CSS_FILE_SUFFIXES_DEFAULT_VALUE, ","); } return suffixes; } CssLanguage(Settings settings); @Override String[] getFileSuffixes(); }
CssLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = settings.getStringArray(Plugin.CSS_FILE_SUFFIXES_KEY); if (suffixes == null || suffixes.length == 0) { suffixes = StringUtils.split(Plugin.CSS_FILE_SUFFIXES_DEFAULT_VALUE, ","); } return suffixes; } CssLanguage(Settings settings); @Override String[] getFileSuffixes(); static final String KEY; static final String NAME; }