@Test public void can_override_file_extensions() { MapSettings mapSettings = new MapSettings(); mapSettings.setProperty("sonar.go.file.suffixes", ".go1,.go2"); GoLanguage typeScriptLanguage = new GoLanguage(mapSettings.asConfig()); assertThat(typeScriptLanguage.getFileSuffixes()).containsExactly(".go1",".go2"); }
@Override public String[] getFileSuffixes() { String[] suffixes = configuration.getStringArray(FILE_SUFFIXES_KEY); if (suffixes.length == 0) { suffixes = new String[] {FILE_SUFFIXES_DEFAULT_VALUE}; } return suffixes; }
GoLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = configuration.getStringArray(FILE_SUFFIXES_KEY); if (suffixes.length == 0) { suffixes = new String[] {FILE_SUFFIXES_DEFAULT_VALUE}; } return suffixes; } }
GoLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = configuration.getStringArray(FILE_SUFFIXES_KEY); if (suffixes.length == 0) { suffixes = new String[] {FILE_SUFFIXES_DEFAULT_VALUE}; } return suffixes; } GoLanguage(Configuration configuration); }
GoLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = configuration.getStringArray(FILE_SUFFIXES_KEY); if (suffixes.length == 0) { suffixes = new String[] {FILE_SUFFIXES_DEFAULT_VALUE}; } return suffixes; } GoLanguage(Configuration configuration); @Override String[] getFileSuffixes(); }
GoLanguage extends AbstractLanguage { @Override public String[] getFileSuffixes() { String[] suffixes = configuration.getStringArray(FILE_SUFFIXES_KEY); if (suffixes.length == 0) { suffixes = new String[] {FILE_SUFFIXES_DEFAULT_VALUE}; } return suffixes; } GoLanguage(Configuration configuration); @Override String[] getFileSuffixes(); static final String KEY; static final String FILE_SUFFIXES_KEY; static final String FILE_SUFFIXES_DEFAULT_VALUE; }