1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Merge pull request #323 from github/add-java-to-supported-langs

Add Java as supported code nav language
This commit is contained in:
Patrick Thomson 2019-10-10 17:47:06 -04:00 committed by GitHub
commit 7aca6fdf4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ supportedExts = foldr append mempty supportedLanguages
lookup k = Map.lookup k Lingo.languages lookup k = Map.lookup k Lingo.languages
codeNavLanguages :: [Language] codeNavLanguages :: [Language]
codeNavLanguages = [Go, Ruby, Python, JavaScript, TypeScript, PHP] codeNavLanguages = [Go, Java, Ruby, Python, JavaScript, TypeScript, PHP]
pathIsMinified :: FilePath -> Bool pathIsMinified :: FilePath -> Bool
pathIsMinified = isExtensionOf ".min.js" pathIsMinified = isExtensionOf ".min.js"

View File

@ -180,7 +180,7 @@ goParser' :: c (Term (Sum Go.Syntax)) => (Language, SomeParser c Loc)
goParser' = (Go, SomeParser goParser) goParser' = (Go, SomeParser goParser)
javaParser' :: c PreciseJava.Term => (Language, SomeParser c Loc) javaParser' :: c PreciseJava.Term => (Language, SomeParser c Loc)
javaParser' = (Python, SomeParser javaParserPrecise) javaParser' = (Java, SomeParser javaParserPrecise)
javascriptParser' :: c (Term (Sum TSX.Syntax)) => (Language, SomeParser c Loc) javascriptParser' :: c (Term (Sum TSX.Syntax)) => (Language, SomeParser c Loc)
javascriptParser' = (JavaScript, SomeParser tsxParser) javascriptParser' = (JavaScript, SomeParser tsxParser)

View File

@ -7,7 +7,7 @@ import Test.Tasty.HUnit
testTree :: TestTree testTree :: TestTree
testTree = testGroup "Data.Language" testTree = testGroup "Data.Language"
[ testCase "supportedExts returns expected list" $ [ testCase "supportedExts returns expected list" $
supportedExts @=? [".go",".rb",".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".rabl",".rake",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr",".py",".bzl",".cgi",".fcgi",".gyp",".gypi",".lmi",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".spec",".tac",".wsgi",".xpy",".js","._js",".bones",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".ts",".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"] supportedExts @=? [".go",".java",".rb",".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".rabl",".rake",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr",".py",".bzl",".cgi",".fcgi",".gyp",".gypi",".lmi",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".spec",".tac",".wsgi",".xpy",".js","._js",".bones",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".ts",".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"]
, testCase "codeNavLanguages returns expected list" $ , testCase "codeNavLanguages returns expected list" $
codeNavLanguages @=? [Go, Ruby, Python, JavaScript, TypeScript, PHP] codeNavLanguages @=? [Go, Java, Ruby, Python, JavaScript, TypeScript, PHP]
] ]