mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +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:
commit
7aca6fdf4c
@ -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"
|
||||||
|
@ -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)
|
||||||
|
@ -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]
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user