tree-sitter-analyzer 0.2.0__tar.gz → 0.3.0__tar.gz

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.

Files changed (106) hide show
  1. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/.gitignore +281 -281
  2. tree_sitter_analyzer-0.3.0/.pre-commit-config.yaml +91 -0
  3. tree_sitter_analyzer-0.3.0/AI_COLLABORATION_GUIDE.md +273 -0
  4. tree_sitter_analyzer-0.3.0/CHANGELOG.md +229 -0
  5. tree_sitter_analyzer-0.3.0/CODE_STYLE_GUIDE.md +358 -0
  6. tree_sitter_analyzer-0.3.0/CONTRIBUTING.md +191 -0
  7. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/DEPLOYMENT_GUIDE.md +278 -278
  8. tree_sitter_analyzer-0.3.0/LLM_CODING_GUIDELINES.md +585 -0
  9. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/MCP_SETUP_DEVELOPERS.md +1 -1
  10. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/PKG-INFO +21 -6
  11. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/README.md +214 -199
  12. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/build_standalone.py +136 -125
  13. tree_sitter_analyzer-0.3.0/check_quality.py +131 -0
  14. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/BigService.java +1420 -1420
  15. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/BigService.json +938 -938
  16. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/BigService.summary.json +650 -650
  17. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/JavaDocTest.java +78 -78
  18. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/MultiClass.java +54 -54
  19. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/Sample.java +178 -178
  20. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/calculate_token_comparison.py +249 -250
  21. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/examples/sample.py +256 -260
  22. tree_sitter_analyzer-0.3.0/llm_code_checker.py +384 -0
  23. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/pyproject.toml +26 -22
  24. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/pytest.ini +34 -34
  25. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/__init__.py +133 -121
  26. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/__main__.py +11 -12
  27. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/api.py +531 -539
  28. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/__init__.py +39 -39
  29. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/__main__.py +12 -13
  30. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/__init__.py +26 -27
  31. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/advanced_command.py +88 -88
  32. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/base_command.py +160 -155
  33. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/default_command.py +18 -19
  34. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/partial_read_command.py +141 -133
  35. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/query_command.py +81 -82
  36. tree_sitter_analyzer-0.3.0/tree_sitter_analyzer/cli/commands/structure_command.py +138 -0
  37. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/summary_command.py +101 -93
  38. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/commands/table_command.py +232 -233
  39. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli/info_commands.py +120 -121
  40. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/cli_main.py +277 -276
  41. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/__init__.py +15 -20
  42. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/analysis_engine.py +591 -574
  43. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/cache_service.py +320 -330
  44. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/engine.py +557 -560
  45. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/parser.py +293 -288
  46. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/core/query.py +494 -502
  47. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/encoding_utils.py +458 -460
  48. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/exceptions.py +337 -340
  49. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/file_handler.py +217 -222
  50. tree_sitter_analyzer-0.3.0/tree_sitter_analyzer/formatters/__init__.py +1 -0
  51. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/formatters/base_formatter.py +167 -168
  52. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/formatters/formatter_factory.py +78 -74
  53. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/formatters/java_formatter.py +287 -270
  54. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/formatters/python_formatter.py +255 -235
  55. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/interfaces/__init__.py +9 -10
  56. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/interfaces/cli.py +528 -557
  57. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/interfaces/cli_adapter.py +322 -319
  58. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/interfaces/mcp_adapter.py +180 -170
  59. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/interfaces/mcp_server.py +405 -416
  60. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/java_analyzer.py +218 -219
  61. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/language_detector.py +398 -400
  62. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/language_loader.py +224 -228
  63. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/languages/__init__.py +10 -11
  64. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/languages/java_plugin.py +1129 -1113
  65. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/languages/python_plugin.py +737 -712
  66. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/__init__.py +31 -32
  67. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/resources/__init__.py +44 -47
  68. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/resources/code_file_resource.py +212 -213
  69. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +560 -550
  70. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/server.py +333 -345
  71. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/__init__.py +30 -31
  72. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +621 -557
  73. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +242 -245
  74. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/base_tool.py +54 -55
  75. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +300 -302
  76. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/table_format_tool.py +362 -359
  77. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +543 -476
  78. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/utils/__init__.py +105 -106
  79. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/mcp/utils/error_handler.py +549 -549
  80. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/models.py +470 -481
  81. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/output_manager.py +261 -264
  82. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/__init__.py +333 -334
  83. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/base.py +477 -446
  84. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/java_plugin.py +608 -625
  85. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/javascript_plugin.py +446 -439
  86. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/manager.py +362 -355
  87. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/plugin_loader.py +85 -83
  88. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/python_plugin.py +606 -598
  89. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/plugins/registry.py +374 -366
  90. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/queries/__init__.py +26 -27
  91. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/queries/java.py +391 -394
  92. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/queries/javascript.py +148 -149
  93. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/queries/python.py +285 -286
  94. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/queries/typescript.py +229 -230
  95. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/query_loader.py +254 -260
  96. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/table_formatter.py +468 -448
  97. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/tree_sitter_analyzer/utils.py +277 -277
  98. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/upload_to_pypi.py +170 -153
  99. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/uv.lock +1884 -1896
  100. tree_sitter_analyzer-0.2.0/CHANGELOG.md +0 -97
  101. tree_sitter_analyzer-0.2.0/CONTRIBUTING.md +0 -98
  102. tree_sitter_analyzer-0.2.0/TOOL_RENAME_PLAN.md +0 -64
  103. tree_sitter_analyzer-0.2.0/tree_sitter_analyzer/cli/commands/structure_command.py +0 -121
  104. tree_sitter_analyzer-0.2.0/tree_sitter_analyzer/formatters/__init__.py +0 -1
  105. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/MCP_SETUP_USERS.md +0 -0
  106. {tree_sitter_analyzer-0.2.0 → tree_sitter_analyzer-0.3.0}/docs/api.md +0 -0
@@ -1,281 +1,281 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- share/python-wheels/
24
- *.egg-info/
25
- .installed.cfg
26
- *.egg
27
- MANIFEST
28
-
29
- # PyInstaller
30
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py,cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # poetry
98
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
- #poetry.lock
103
-
104
- # pdm
105
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
- #pdm.lock
107
- # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
- # in version control.
109
- # https://pdm.fming.dev/#use-with-ide
110
- .pdm.toml
111
-
112
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
- __pypackages__/
114
-
115
- # Celery stuff
116
- celerybeat-schedule
117
- celerybeat.pid
118
-
119
- # SageMath parsed files
120
- *.sage.py
121
-
122
- # Environments
123
- .env
124
- .venv
125
- env/
126
- venv/
127
- ENV/
128
- env.bak/
129
- venv.bak/
130
-
131
- # Spyder project settings
132
- .spyderproject
133
- .spyproject
134
-
135
- # Rope project settings
136
- .ropeproject
137
-
138
- # mkdocs documentation
139
- /site
140
-
141
- # mypy
142
- .mypy_cache/
143
- .dmypy.json
144
- dmypy.json
145
-
146
- # Pyre type checker
147
- .pyre/
148
-
149
- # pytype static type analyzer
150
- .pytype/
151
-
152
- # Cython debug symbols
153
- cython_debug/
154
-
155
- # PyCharm
156
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
- # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
- # project, it is recommended to use the following settings for the Project Structure:
159
- # File | Settings | Project Structure | Add Content Root | Exclude files | *.pyc
160
- .idea/
161
-
162
- # VS Code
163
- .vscode/
164
- *.code-workspace
165
-
166
- # Local History for Visual Studio Code
167
- .history/
168
-
169
- # Built Visual Studio Code Extensions
170
- *.vsix
171
-
172
- # macOS
173
- .DS_Store
174
- .AppleDouble
175
- .LSOverride
176
-
177
- # Icon must end with two \r
178
- Icon
179
-
180
- # Thumbnails
181
- ._*
182
-
183
- # Files that might appear in the root of a volume
184
- .DocumentRevisions-V100
185
- .fseventsd
186
- .Spotlight-V100
187
- .TemporaryItems
188
- .Trashes
189
- .VolumeIcon.icns
190
- .com.apple.timemachine.donotpresent
191
-
192
- # Directories potentially created on remote AFP share
193
- .AppleDB
194
- .AppleDesktop
195
- Network Trash Folder
196
- Temporary Items
197
- .apdisk
198
-
199
- # Windows
200
- Thumbs.db
201
- Thumbs.db:encryptable
202
- ehthumbs.db
203
- ehthumbs_vista.db
204
-
205
- # Dump file
206
- *.stackdump
207
-
208
- # Folder config file
209
- [Dd]esktop.ini
210
-
211
- # Recycle Bin used on file shares
212
- $RECYCLE.BIN/
213
-
214
- # Windows Installer files
215
- *.cab
216
- *.msi
217
- *.msix
218
- *.msm
219
- *.msp
220
-
221
- # Windows shortcuts
222
- *.lnk
223
-
224
- # Linux
225
- *~
226
-
227
- # temporary files which can be created if a process still has a handle open of a deleted file
228
- .fuse_hidden*
229
-
230
- # KDE directory preferences
231
- .directory
232
-
233
- # Linux trash folder which might appear on any partition or disk
234
- .Trash-*
235
-
236
- # .nfs files are created when an open file is removed but is still being accessed
237
- .nfs*
238
-
239
- # Project specific files
240
- error.log
241
- *.log
242
- input_handler.py
243
- prompt_config.json
244
- user_input_prompt.md
245
- ISSUE_TRACKING.md
246
- OPTIMIZATION_REPORT.md
247
-
248
-
249
- # Development and temporary files
250
- prompt_history/
251
- temp/
252
- tmp/
253
- .temp/
254
-
255
- # Tree-sitter specific
256
- tree-sitter-*/
257
- *.so
258
- *.dylib
259
- *.dll
260
-
261
- # UV lock file (keep uv.lock for reproducible builds)
262
- # uv.lock
263
-
264
- # Benchmark and performance files
265
- benchmark_results/
266
- performance_data/
267
-
268
- # Local configuration files
269
- local_config.py
270
- local_settings.py
271
- .local/
272
-
273
- # Editor backup files
274
- *~
275
- *.swp
276
- *.swo
277
- *#
278
- .#*
279
-
280
- # Compiled tree-sitter parsers
281
- parsers/
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
+ # project, it is recommended to use the following settings for the Project Structure:
159
+ # File | Settings | Project Structure | Add Content Root | Exclude files | *.pyc
160
+ .idea/
161
+
162
+ # VS Code
163
+ .vscode/
164
+ *.code-workspace
165
+
166
+ # Local History for Visual Studio Code
167
+ .history/
168
+
169
+ # Built Visual Studio Code Extensions
170
+ *.vsix
171
+
172
+ # macOS
173
+ .DS_Store
174
+ .AppleDouble
175
+ .LSOverride
176
+
177
+ # Icon must end with two \r
178
+ Icon
179
+
180
+ # Thumbnails
181
+ ._*
182
+
183
+ # Files that might appear in the root of a volume
184
+ .DocumentRevisions-V100
185
+ .fseventsd
186
+ .Spotlight-V100
187
+ .TemporaryItems
188
+ .Trashes
189
+ .VolumeIcon.icns
190
+ .com.apple.timemachine.donotpresent
191
+
192
+ # Directories potentially created on remote AFP share
193
+ .AppleDB
194
+ .AppleDesktop
195
+ Network Trash Folder
196
+ Temporary Items
197
+ .apdisk
198
+
199
+ # Windows
200
+ Thumbs.db
201
+ Thumbs.db:encryptable
202
+ ehthumbs.db
203
+ ehthumbs_vista.db
204
+
205
+ # Dump file
206
+ *.stackdump
207
+
208
+ # Folder config file
209
+ [Dd]esktop.ini
210
+
211
+ # Recycle Bin used on file shares
212
+ $RECYCLE.BIN/
213
+
214
+ # Windows Installer files
215
+ *.cab
216
+ *.msi
217
+ *.msix
218
+ *.msm
219
+ *.msp
220
+
221
+ # Windows shortcuts
222
+ *.lnk
223
+
224
+ # Linux
225
+ *~
226
+
227
+ # temporary files which can be created if a process still has a handle open of a deleted file
228
+ .fuse_hidden*
229
+
230
+ # KDE directory preferences
231
+ .directory
232
+
233
+ # Linux trash folder which might appear on any partition or disk
234
+ .Trash-*
235
+
236
+ # .nfs files are created when an open file is removed but is still being accessed
237
+ .nfs*
238
+
239
+ # Project specific files
240
+ error.log
241
+ *.log
242
+ input_handler.py
243
+ prompt_config.json
244
+ user_input_prompt.md
245
+ ISSUE_TRACKING.md
246
+ OPTIMIZATION_REPORT.md
247
+
248
+
249
+ # Development and temporary files
250
+ prompt_history/
251
+ temp/
252
+ tmp/
253
+ .temp/
254
+
255
+ # Tree-sitter specific
256
+ tree-sitter-*/
257
+ *.so
258
+ *.dylib
259
+ *.dll
260
+
261
+ # UV lock file (keep uv.lock for reproducible builds)
262
+ # uv.lock
263
+
264
+ # Benchmark and performance files
265
+ benchmark_results/
266
+ performance_data/
267
+
268
+ # Local configuration files
269
+ local_config.py
270
+ local_settings.py
271
+ .local/
272
+
273
+ # Editor backup files
274
+ *~
275
+ *.swp
276
+ *.swo
277
+ *#
278
+ .#*
279
+
280
+ # Compiled tree-sitter parsers
281
+ parsers/
@@ -0,0 +1,91 @@
1
+ # Pre-commit hooks for Tree-sitter Analyzer
2
+ # Install: uv add --dev pre-commit && uv run pre-commit install
3
+
4
+ repos:
5
+ # Python code formatting
6
+ - repo: https://github.com/psf/black
7
+ rev: 24.10.0
8
+ hooks:
9
+ - id: black
10
+ language_version: python3
11
+ args: [--line-length=88]
12
+
13
+ # Python linting and code quality
14
+ - repo: https://github.com/astral-sh/ruff-pre-commit
15
+ rev: v0.8.4
16
+ hooks:
17
+ - id: ruff
18
+ args: [--fix, --exit-non-zero-on-fix]
19
+ - id: ruff-format
20
+
21
+ # Basic file checks
22
+ - repo: https://github.com/pre-commit/pre-commit-hooks
23
+ rev: v5.0.0
24
+ hooks:
25
+ - id: trailing-whitespace
26
+ exclude: \.md$
27
+ - id: end-of-file-fixer
28
+ exclude: \.md$
29
+ - id: check-yaml
30
+ - id: check-json
31
+ exclude: ^examples/.*\.(json|summary\.json)$
32
+ - id: check-toml
33
+ - id: check-merge-conflict
34
+ - id: check-added-large-files
35
+ args: [--maxkb=1000]
36
+ - id: check-case-conflict
37
+ - id: mixed-line-ending
38
+ args: [--fix=lf]
39
+
40
+ # Python-specific checks
41
+ - repo: https://github.com/pre-commit/pre-commit-hooks
42
+ rev: v5.0.0
43
+ hooks:
44
+ - id: check-ast
45
+ - id: check-builtin-literals
46
+ - id: check-docstring-first
47
+ - id: debug-statements
48
+ - id: name-tests-test
49
+ args: [--pytest-test-first]
50
+
51
+ # Security checks
52
+ - repo: https://github.com/PyCQA/bandit
53
+ rev: 1.7.10
54
+ hooks:
55
+ - id: bandit
56
+ args: [-r, tree_sitter_analyzer/]
57
+ exclude: ^tests/
58
+
59
+ # Import sorting
60
+ - repo: https://github.com/pycqa/isort
61
+ rev: 5.13.2
62
+ hooks:
63
+ - id: isort
64
+ args: [--profile, black, --line-length, "88"]
65
+
66
+ # Type checking (optional, can be slow)
67
+ - repo: local
68
+ hooks:
69
+ - id: mypy
70
+ name: mypy
71
+ entry: uv run mypy
72
+ language: system
73
+ types: [python]
74
+ args: [--no-error-summary, --show-error-codes]
75
+ pass_filenames: false
76
+ stages: [manual] # Only run when explicitly requested
77
+
78
+ # Custom quality check
79
+ - repo: local
80
+ hooks:
81
+ - id: quality-check
82
+ name: Tree-sitter Analyzer Quality Check
83
+ entry: python check_quality.py --new-code-only
84
+ language: system
85
+ pass_filenames: false
86
+ stages: [pre-push] # Only run on push
87
+
88
+ # Configuration
89
+ default_stages: [pre-commit]
90
+ fail_fast: false
91
+ minimum_pre_commit_version: "3.0.0"