Ragex.Analyzers.SCIP.Registry (Ragex v0.16.0)

View Source

Maps project marker files to languages and their SCIP indexer tools.

Detects which languages are present in a project directory by looking for marker files (e.g. go.mod -> Go, Cargo.toml -> Rust), and knows which SCIP indexer binary to run for each language.

Supported Languages

LanguageMarker File(s)Indexer BinaryExtensions
Gogo.modscip-go.go
RustCargo.tomlrust-analyzer.rs
Javapom.xml, build.gradlescip-java.java
Kotlinbuild.gradle.ktsscip-java.kt, .kts
Scalabuild.sbtscip-java.scala
C/C++CMakeLists.txtscip-clang.c, .cpp, .h
C#*.csproj, *.slnscip-dotnet.cs
RubyGemfilescip-ruby.rb
Dartpubspec.yamlscip-dart.dart
PHPcomposer.jsonscip-php.php

Languages already handled natively by Ragex (Elixir, Erlang, Python, JavaScript/TypeScript) are excluded -- Ragex's own analyzers or Metastatic provide deeper AST access for those.

Summary

Functions

Returns all known SCIP-supported language definitions.

Check which SCIP indexer binaries are available on the system.

Detect which SCIP-supported languages are present in a directory.

Returns language info for a given language name, or nil.

Check if the scip CLI is available.

Returns all file extensions handled by SCIP (not by native analyzers).

Types

language_info()

@type language_info() :: %{
  language: String.t(),
  indexer: String.t(),
  indexer_args: [String.t()],
  extensions: [String.t()],
  marker_files: [String.t()]
}

Functions

all_languages()

@spec all_languages() :: [language_info()]

Returns all known SCIP-supported language definitions.

check_indexers()

@spec check_indexers() :: %{
  required(String.t()) => %{available: boolean(), path: String.t() | nil}
}

Check which SCIP indexer binaries are available on the system.

Returns a map of %{language => %{available: bool, path: String.t() | nil}}.

detect_languages(project_dir)

@spec detect_languages(String.t()) :: [language_info()]

Detect which SCIP-supported languages are present in a directory.

Returns a list of language info maps for each detected language.

get_language(name)

@spec get_language(String.t()) :: language_info() | nil

Returns language info for a given language name, or nil.

scip_cli_available?()

@spec scip_cli_available?() :: boolean()

Check if the scip CLI is available.

scip_extensions()

@spec scip_extensions() :: [String.t()]

Returns all file extensions handled by SCIP (not by native analyzers).