@@ -10,7 +10,8 @@ It is based on a parser generator tool and an incremental parsing library
1010called
1111<a href =" https://tree-sitter.github.io/tree-sitter/ " target =" _blank " >Tree Sitter</a >.
1212
13- This library is a fork of [ Mozilla rust-code-analysis] ( https://github.com/mozilla/rust-code-analysis )
13+ This crate is the Singularity-maintained continuation of
14+ [ Mozilla rust-code-analysis] ( https://github.com/mozilla/rust-code-analysis ) ,
1415with enhanced support for BEAM languages (Elixir, Erlang, Gleam) and additional
1516code complexity metrics.
1617
@@ -86,17 +87,30 @@ fn calculate(x: i32, y: i32) -> i32 {
8687
8788### Supported Languages
8889
89- | Language | Status | Metrics | Function Detection |
90- | ----------| --------| ---------| -------------------|
91- | ** Rust** | ✅ Full | ✅ Complete | ✅ Full |
92- | ** Python** | ✅ Full | ✅ Complete | ✅ Full |
93- | ** JavaScript/TypeScript** | ✅ Full | ✅ Complete | ✅ Full |
94- | ** Java** | ✅ Full | ✅ Complete | ✅ Full |
95- | ** C/C++** | ✅ Full | ✅ Complete | ✅ Full |
96- | ** Elixir** | ✅ Full | ⚠️ Partial | ✅ Full |
97- | ** Erlang** | ✅ Full | ⚠️ Partial | ✅ Full |
98- | ** Gleam** | ✅ Full | ⚠️ Partial | ✅ Full |
99- | ** Lua** | ✅ Full | ⚠️ Partial | ✅ Full |
90+ | Language | Parsing & Function Detection | Metrics Coverage | Notes |
91+ | ----------| ------------------------------| ------------------| -------|
92+ | ** Rust** | ✅ Full | ✅ Full | |
93+ | ** Python** | ✅ Full | ✅ Full | |
94+ | ** JavaScript** | ✅ Full | ✅ Full | |
95+ | ** TypeScript** | ✅ Full | ✅ Full | Covers the ` LANG::Typescript ` parser. |
96+ | ** TSX (TypeScript + JSX)** | ✅ Full | ✅ Full | Covers the ` LANG::Tsx ` parser for mixed TS/JSX files. |
97+ | ** Java** | ✅ Full | ✅ Full | Weighted Methods per Class (WMC) implemented only for Java. |
98+ | ** C/C++** | ✅ Full | ✅ Full | See the macro parsing note below for known limitations. |
99+ | ** Kotlin** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
100+ | ** Go** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
101+ | ** C#** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
102+ | ** Elixir** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
103+ | ** Erlang** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
104+ | ** Gleam** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
105+ | ** Lua** | ✅ Full | ⚠️ Partial | LOC, exit counting, and WMC metrics are not yet implemented. |
106+
107+ > [ !IMPORTANT]
108+ > ### Known C/C++ limitations
109+ > Tree-sitter's C/C++ grammars still struggle with Mozilla-style macro expansions.
110+ > The three unit tests under ` c_langs_macros ` are expected to fail until the
111+ > upstream grammar exposes these constructs without parse errors. Function and
112+ > metrics analysis for typical C/C++ codebases works as expected; only heavily
113+ > macro-based signatures are affected.
100114
101115## Metrics
102116
@@ -251,5 +265,6 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
251265
252266## Acknowledgments
253267
254- This library is a fork of [ Mozilla rust-code-analysis] ( https://github.com/mozilla/rust-code-analysis ) .
268+ singularity-code-analysis started as a fork of
269+ [ Mozilla rust-code-analysis] ( https://github.com/mozilla/rust-code-analysis ) .
255270Special thanks to the Mozilla team for their excellent work on code analysis tools.
0 commit comments