Repository Analysis

tree-sitter/tree-sitter

An incremental parsing system for programming tools

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-30
Last Push
25,611
Stars
Rust
Language
105,115
Lines of Code
340
Files
143
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 3MEDIUM 1LOW 139

Pattern Findings

143 matches across 6 categories. Click a row to expand file-level details.

Over-Commented Block130 hits · 129 pts
SeverityFileLineSnippet
LOWcrates/highlight/src/c_lib.rs61 attribute_strings,
LOWcrates/highlight/src/c_lib.rs161///
LOWcrates/highlight/src/c_lib.rs181///
LOWcrates/highlight/src/c_lib.rs201#[unsafe(no_mangle)]
LOWcrates/highlight/src/highlight.rs341 ///
LOWcrates/language/wasm/include/inttypes.h1#ifndef TREE_SITTER_WASM_INTTYPES_H_
LOWcrates/language/wasm/include/endian.h1#ifndef TREE_SITTER_WASM_ENDIAN_H_
LOWcrates/language/wasm/include/assert.h1#ifndef TREE_SITTER_WASM_ASSERT_H_
LOWcrates/language/wasm/include/stdint.h21
LOWcrates/language/wasm/src/stdlib.c1// This file implements a very simple allocator for external scanners running
LOWcrates/language/src/language.rs1#![no_std]
LOWcrates/cli/src/test.rs181 #[serde(serialize_with = "serialize_as_array")]
LOWcrates/cli/src/test.rs201 pub query_results: TestResultHierarchy,
LOWcrates/cli/src/main.rs81#[derive(Args)]
LOWcrates/cli/src/main.rs121 #[arg(long, short = '0')]
LOWcrates/cli/src/main.rs161 default_value = "node"
LOWcrates/cli/src/main.rs181 pub output: Option<PathBuf>,
LOWcrates/cli/src/main.rs201 pub paths_file: Option<PathBuf>,
LOWcrates/cli/src/main.rs221 clippy::option_option,
LOWcrates/cli/src/main.rs241 #[arg(long = "cst", short = 'c')]
LOWcrates/cli/src/main.rs261 #[arg(
LOWcrates/cli/src/main.rs301#[command(alias = "t")]
LOWcrates/cli/src/main.rs321 pub lang_name: Option<String>,
LOWcrates/cli/src/main.rs341 #[arg(long)]
LOWcrates/cli/src/main.rs381 #[arg(long, short = 'p')]
LOWcrates/cli/src/main.rs441 /// Path to a file with queries
LOWcrates/cli/src/main.rs461 #[arg(long = "paths")]
LOWcrates/cli/src/main.rs481 #[arg(long)]
LOWcrates/cli/src/main.rs501#[derive(Args)]
LOWcrates/cli/src/main.rs521 pub scope: Option<String>,
LOWcrates/cli/src/main.rs541 #[arg(long, short = 'n')]
LOWcrates/cli/src/main.rs561 #[arg(long, short)]
LOWcrates/cli/src/tests/query_test.rs3681 let language = get_language("javascript");
LOWcrates/cli/src/tests/query_test.rs4621 ("(heredoc_end)", true),
LOWcrates/cli/src/tests/query_test.rs5441 });
LOWcrates/cli/src/templates/lib.rs1//! This crate provides TITLE_PARSER_NAME language support for the [tree-sitter] parsing library.
LOWcrates/tags/src/c_lib.rs81/// Add a language to a [`TSTagger`].
LOWcrates/tags/src/c_lib.rs241 drop(Box::from_raw(this));
LOWcrates/tags/src/c_lib.rs261/// # Safety
LOWcrates/tags/src/c_lib.rs281#[unsafe(no_mangle)]
LOWcrates/tags/src/c_lib.rs301/// `this` must be non-null and a valid pointer to a [`TSTagsBuffer`] instance created by
LOWcrates/loader/src/loader.rs121 #[error(transparent)]
LOWcrates/generate/src/parse_grammar.rs161 /// externals, precedences).
LOWcrates/generate/src/render.rs1921 add!(self, "0x{:02x}", c as u32);
LOWcrates/generate/src/node_types.rs141
LOWcrates/generate/src/node_types.rs161/// * `multiple` - Can `N` nodes have multiple children for this field?
LOWcrates/generate/src/templates/array.h1#ifndef TREE_SITTER_ARRAY_H_
LOWcrates/generate/src/templates/array.h141 (other)->contents = _array_swap_tmp; \
LOWcrates/generate/src/templates/array.h161/// of a given struct field (specified with a leading dot) to determine the order.
LOWcrates/generate/src/templates/array.h321#pragma warning(pop)
LOWcrates/generate/src/templates/alloc.h21#define ts_malloc ts_current_malloc
LOWcrates/generate/src/templates/alloc.h41#ifndef ts_realloc
LOWcrates/generate/src/build_tables/item_set_builder.rs141 //
LOWcrates/generate/src/build_tables/item.rs41 /// hidden nodes and had fields. Ordinarily, a parse item's behavior is not
LOWcrates/xtask/src/main.rs21#[command(about="Run various tasks", author=crate_authors!("\n"), styles=get_styles())]
LOWcrates/xtask/src/main.rs61 /// The example file to run the benchmarks for.
LOWcrates/xtask/src/main.rs81 docker: bool,
LOWcrates/xtask/src/main.rs121#[derive(Args)]
LOWcrates/xtask/src/main.rs141 iterations: Option<u32>,
LOWcrates/xtask/src/embed_sources.rs1use anyhow::Result;
70 more matches not shown…
Cross-Language Confusion (JS/TS)3 hits · 22 pts
SeverityFileLineSnippet
HIGHlib/binding_web/test/node.test.ts85 elif two:
HIGHlib/binding_web/test/node.test.ts87 elif three:
HIGHlib/binding_web/test/node.test.ts89 elif four:
Unused Imports5 hits · 5 pts
SeverityFileLineSnippet
LOWcrates/cli/src/templates/__init__.py5
LOWlib/lldb_pretty_printers/tree_sitter_types.py5
LOWlib/lldb_pretty_printers/tree_sitter_types.py6
LOWlib/lldb_pretty_printers/tree_sitter_types.py7
LOWlib/lldb_pretty_printers/tree_sitter_types.py7
Excessive Try-Catch Wrapping2 hits · 3 pts
SeverityFileLineSnippet
LOWcrates/cli/src/templates/test_binding.py11 except Exception:
MEDIUMcrates/cli/src/templates/test_binding.py8def test_can_load_grammar(self):
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippet
LOWlib/lldb_pretty_printers/ts_tree.py53
LOWlib/lldb_pretty_printers/ts_tree.py69
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWlib/binding_web/src/marshal.ts172export function unmarshalLanguageMetadata(address: number): LanguageMetadata {