- EXTENSION_PATTERNS =
{
"python" => [".py", ".pyx", ".pyi"],
"java" => [".java"],
"cpp" => [".cpp", ".cc", ".cxx", ".c++", ".hpp", ".h"],
"c" => [".c", ".h"],
"go" => [".go"],
"rust" => [".rs"],
"php" => [".php"],
"swift" => [".swift"],
"dart" => [".dart"],
"scala" => [".scala"],
"clojure" => [".clj", ".cljs", ".cljc"],
"haskell" => [".hs", ".lhs"],
"erlang" => [".erl", ".hrl"],
"csharp" => [".cs"],
"fsharp" => [".fs", ".fsx"],
"perl" => [".pl", ".pm"],
"lua" => [".lua"],
"r" => [".R", ".r"],
"matlab" => [".m"],
"julia" => [".jl"]
}.freeze
- TEST_DIR_PATTERNS =
{
"python" => %w[tests test],
"java" => ["src/test/java", "test"],
"go" => ["."], "rust" => ["tests"],
"php" => %w[tests test],
"swift" => ["Tests"],
"dart" => ["test"],
"scala" => ["src/test/scala", "test"],
"clojure" => ["test"],
"haskell" => ["test"],
"erlang" => ["test"],
"csharp" => %w[test tests],
"fsharp" => %w[test tests],
"perl" => %w[t test],
"lua" => %w[test spec],
"r" => %w[tests test],
"matlab" => ["test"],
"julia" => ["test"]
}.freeze
- PROJECT_FILES =
{
"python" => ["requirements.txt", "setup.py", "pyproject.toml", "Pipfile"],
"java" => ["pom.xml", "build.gradle", "build.gradle.kts"],
"go" => ["go.mod", "go.sum"],
"rust" => ["Cargo.toml", "Cargo.lock"],
"php" => ["composer.json", "composer.lock"],
"swift" => ["Package.swift"],
"dart" => ["pubspec.yaml"],
"scala" => ["build.sbt", "project/build.properties"],
"clojure" => ["project.clj", "deps.edn"],
"haskell" => ["*.cabal", "stack.yaml"],
"erlang" => ["rebar.config", "erlang.mk"],
"csharp" => ["*.csproj", "*.sln"],
"fsharp" => ["*.fsproj", "*.sln"],
"perl" => ["Makefile.PL", "Build.PL"],
"lua" => ["*.rockspec"],
"r" => %w[DESCRIPTION NAMESPACE],
"matlab" => ["*.prj"],
"julia" => ["Project.toml", "Manifest.toml"]
}.freeze