mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 14:13:07 -03:00
refactoring: remove un-used code, add go doc, fix ci (#199)
Refactoring, consisting of - remove unused method `isAuxiliaryLanguage` and `FileCountList` in order to reduce public API surfaces (go/java) - add GoDoc to public APIs - ci: java profile use latest go src It also now mimics https://docs.travis-ci.com/user/languages/go/#go-import-path for non-go build image, as code relies on internal imports. TEST PLAN: - make test
This commit is contained in:
@ -28,7 +28,7 @@ $(RESOURCES_DIR): os-shared-lib
|
||||
cp -R $(RESOURCES_SRC) $(RESOURCES_DIR)
|
||||
|
||||
$(JNAERATOR_JAR): $(RESOURCES_DIR)
|
||||
mkdir $(JNAERATOR_DIR) && \
|
||||
mkdir -p $(JNAERATOR_DIR) && \
|
||||
wget $(JNAERATOR_JAR_URL) -O $(JNAERATOR_JAR)
|
||||
|
||||
os-shared-lib:
|
||||
|
@ -9,16 +9,6 @@ public class Enry {
|
||||
|
||||
private static final EnryLibrary nativeLib = EnryLibrary.INSTANCE;
|
||||
|
||||
/**
|
||||
* Returns whether the given language is auxiliary or not.
|
||||
*
|
||||
* @param language name of the language, e.g. PHP, HTML, ...
|
||||
* @return if it's an auxiliary language
|
||||
*/
|
||||
public static synchronized boolean isAuxiliaryLanguage(String language) {
|
||||
return toJavaBool(nativeLib.IsAuxiliaryLanguage(toGoString(language)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the language of the given file based on the filename and its
|
||||
* contents.
|
||||
|
@ -6,12 +6,6 @@ import static org.junit.Assert.*;
|
||||
|
||||
public class EnryTest {
|
||||
|
||||
@Test
|
||||
public void isAuxiliaryLanguage() {
|
||||
assertTrue(Enry.isAuxiliaryLanguage("HTML"));
|
||||
assertFalse(Enry.isAuxiliaryLanguage("Go"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getLanguage() {
|
||||
String code = "<?php $foo = bar();";
|
||||
|
Reference in New Issue
Block a user