tree-sitter-analyzer 1.3.2__py3-none-any.whl → 1.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tree-sitter-analyzer might be problematic. Click here for more details.
- tree_sitter_analyzer/__init__.py +1 -1
- tree_sitter_analyzer/mcp/tools/fd_rg_utils.py +1 -1
- tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py +26 -2
- {tree_sitter_analyzer-1.3.2.dist-info → tree_sitter_analyzer-1.3.3.dist-info}/METADATA +1 -1
- {tree_sitter_analyzer-1.3.2.dist-info → tree_sitter_analyzer-1.3.3.dist-info}/RECORD +7 -7
- {tree_sitter_analyzer-1.3.2.dist-info → tree_sitter_analyzer-1.3.3.dist-info}/WHEEL +0 -0
- {tree_sitter_analyzer-1.3.2.dist-info → tree_sitter_analyzer-1.3.3.dist-info}/entry_points.txt +0 -0
tree_sitter_analyzer/__init__.py
CHANGED
|
@@ -148,7 +148,7 @@ def build_fd_command(
|
|
|
148
148
|
cmd += ["--max-results", str(limit)]
|
|
149
149
|
|
|
150
150
|
# Pattern goes before roots if present
|
|
151
|
-
# If no pattern is specified, use '.' to match all files
|
|
151
|
+
# If no pattern is specified, use '.' to match all files (required to prevent roots being interpreted as pattern)
|
|
152
152
|
if pattern:
|
|
153
153
|
cmd.append(pattern)
|
|
154
154
|
else:
|
|
@@ -7,13 +7,17 @@ First narrow files with fd, then search contents with ripgrep, with caps & meta.
|
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
|
+
import logging
|
|
10
11
|
import time
|
|
11
12
|
from typing import Any
|
|
12
13
|
|
|
13
14
|
from ..utils.error_handler import handle_mcp_errors
|
|
15
|
+
from ..utils.gitignore_detector import get_default_detector
|
|
14
16
|
from . import fd_rg_utils
|
|
15
17
|
from .base_tool import BaseMCPTool
|
|
16
18
|
|
|
19
|
+
logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
17
21
|
|
|
18
22
|
class FindAndGrepTool(BaseMCPTool):
|
|
19
23
|
"""MCP tool that composes fd and ripgrep with safety limits and metadata."""
|
|
@@ -228,6 +232,26 @@ class FindAndGrepTool(BaseMCPTool):
|
|
|
228
232
|
fd_rg_utils.DEFAULT_RESULTS_LIMIT,
|
|
229
233
|
fd_rg_utils.MAX_RESULTS_HARD_CAP,
|
|
230
234
|
)
|
|
235
|
+
|
|
236
|
+
# Smart .gitignore detection for fd stage
|
|
237
|
+
no_ignore = bool(arguments.get("no_ignore", False))
|
|
238
|
+
if not no_ignore:
|
|
239
|
+
# Auto-detect if we should use --no-ignore
|
|
240
|
+
detector = get_default_detector()
|
|
241
|
+
original_roots = arguments.get("roots", [])
|
|
242
|
+
should_ignore = detector.should_use_no_ignore(
|
|
243
|
+
original_roots, self.project_root
|
|
244
|
+
)
|
|
245
|
+
if should_ignore:
|
|
246
|
+
no_ignore = True
|
|
247
|
+
# Log the auto-detection for debugging
|
|
248
|
+
detection_info = detector.get_detection_info(
|
|
249
|
+
original_roots, self.project_root
|
|
250
|
+
)
|
|
251
|
+
logger.info(
|
|
252
|
+
f"Auto-enabled --no-ignore due to .gitignore interference: {detection_info['reason']}"
|
|
253
|
+
)
|
|
254
|
+
|
|
231
255
|
fd_cmd = fd_rg_utils.build_fd_command(
|
|
232
256
|
pattern=arguments.get("pattern"),
|
|
233
257
|
glob=bool(arguments.get("glob", False)),
|
|
@@ -237,7 +261,7 @@ class FindAndGrepTool(BaseMCPTool):
|
|
|
237
261
|
depth=arguments.get("depth"),
|
|
238
262
|
follow_symlinks=bool(arguments.get("follow_symlinks", False)),
|
|
239
263
|
hidden=bool(arguments.get("hidden", False)),
|
|
240
|
-
no_ignore=
|
|
264
|
+
no_ignore=no_ignore,
|
|
241
265
|
size=arguments.get("size"),
|
|
242
266
|
changed_within=arguments.get("changed_within"),
|
|
243
267
|
changed_before=arguments.get("changed_before"),
|
|
@@ -328,7 +352,7 @@ class FindAndGrepTool(BaseMCPTool):
|
|
|
328
352
|
exclude_globs=arguments.get("exclude_globs"),
|
|
329
353
|
follow_symlinks=bool(arguments.get("follow_symlinks", False)),
|
|
330
354
|
hidden=bool(arguments.get("hidden", False)),
|
|
331
|
-
no_ignore=
|
|
355
|
+
no_ignore=no_ignore, # Use the same no_ignore flag from fd stage
|
|
332
356
|
max_filesize=arguments.get("max_filesize"),
|
|
333
357
|
context_before=arguments.get("context_before"),
|
|
334
358
|
context_after=arguments.get("context_after"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tree-sitter-analyzer
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3
|
|
4
4
|
Summary: Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
|
|
5
5
|
Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
|
|
6
6
|
Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
tree_sitter_analyzer/__init__.py,sha256=
|
|
1
|
+
tree_sitter_analyzer/__init__.py,sha256=r__BiyUTRrGkm29pm1ghhF6fDK3-PbOdEmK69CRmvlc,3067
|
|
2
2
|
tree_sitter_analyzer/__main__.py,sha256=Zl79tpe4UaMu-7yeztc06tgP0CVMRnvGgas4ZQP5SCs,228
|
|
3
3
|
tree_sitter_analyzer/api.py,sha256=N_bcf1pLwzXS3elPn30OySLR6ehsHdWpchXMycjl0PY,17399
|
|
4
4
|
tree_sitter_analyzer/cli_main.py,sha256=jWjVJ5AgNmtf6Z7CgeK3IF-zi7yIiu9zn4Oyvzl-iNQ,10349
|
|
@@ -57,8 +57,8 @@ tree_sitter_analyzer/mcp/tools/__init__.py,sha256=9KfetZTaUhvWTeKuZPYzWb7ZomFQ8S
|
|
|
57
57
|
tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py,sha256=JyS9gey2oFoWjzsiiLjwcqTgwBYGlbY01vAK3QYUuF4,28470
|
|
58
58
|
tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py,sha256=mssed7bEfGeGxW4mOf7dg8BDS1oqHLolIBNX9DaZ3DM,8997
|
|
59
59
|
tree_sitter_analyzer/mcp/tools/base_tool.py,sha256=qf2My325azlnKOugNVMN_R1jtZcjXVy354sGVKzvZls,3546
|
|
60
|
-
tree_sitter_analyzer/mcp/tools/fd_rg_utils.py,sha256=
|
|
61
|
-
tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py,sha256=
|
|
60
|
+
tree_sitter_analyzer/mcp/tools/fd_rg_utils.py,sha256=R1ICH40vkWO3OdKZjxok9ptQZpZ6-tM5SkLHHOC4-BE,17749
|
|
61
|
+
tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py,sha256=u4VeRWhyS_kltWtuzwHNPtmFHjQguKAceP9X-RHD7Lk,21194
|
|
62
62
|
tree_sitter_analyzer/mcp/tools/list_files_tool.py,sha256=TA1BRQtb-D5x1pD-IcRJYnP0WnnFfl9q7skI25MOdHk,12873
|
|
63
63
|
tree_sitter_analyzer/mcp/tools/query_tool.py,sha256=1xY1ONNY2sIFJxoILlnNzBnwGVgzEF7vVJ2ccqR9auA,10879
|
|
64
64
|
tree_sitter_analyzer/mcp/tools/read_partial_tool.py,sha256=BMAJF205hTIrYTQJG6N1-vVuKSby2CSm9nWzSMMWceI,11339
|
|
@@ -82,7 +82,7 @@ tree_sitter_analyzer/security/__init__.py,sha256=ZTqTt24hsljCpTXAZpJC57L7MU5lJLT
|
|
|
82
82
|
tree_sitter_analyzer/security/boundary_manager.py,sha256=3eeENRKWtz2pyZHzd8DiVaq8fdeC6s1eVOuBylSmQPg,9347
|
|
83
83
|
tree_sitter_analyzer/security/regex_checker.py,sha256=jWK6H8PTPgzbwRPfK_RZ8bBTS6rtEbgjY5vr3YWjQ_U,9616
|
|
84
84
|
tree_sitter_analyzer/security/validator.py,sha256=yR4qTWEcXpR--bSFwtWvSgY0AzqujOFAqlc1Z7dlTdk,9809
|
|
85
|
-
tree_sitter_analyzer-1.3.
|
|
86
|
-
tree_sitter_analyzer-1.3.
|
|
87
|
-
tree_sitter_analyzer-1.3.
|
|
88
|
-
tree_sitter_analyzer-1.3.
|
|
85
|
+
tree_sitter_analyzer-1.3.3.dist-info/METADATA,sha256=VbZrzl42nAT_tzUzKscSOCuUaibEuaM7nQdP508Wlcw,39710
|
|
86
|
+
tree_sitter_analyzer-1.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
87
|
+
tree_sitter_analyzer-1.3.3.dist-info/entry_points.txt,sha256=U4tfLGXgCWubKm2PyEb3zxhQ2pm7zVotMyfyS0CodD8,486
|
|
88
|
+
tree_sitter_analyzer-1.3.3.dist-info/RECORD,,
|
|
File without changes
|
{tree_sitter_analyzer-1.3.2.dist-info → tree_sitter_analyzer-1.3.3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|