thailint 0.1.0__py3-none-any.whl → 0.1.1__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.
- {thailint-0.1.0.dist-info → thailint-0.1.1.dist-info}/METADATA +58 -30
- {thailint-0.1.0.dist-info → thailint-0.1.1.dist-info}/RECORD +5 -5
- {thailint-0.1.0.dist-info → thailint-0.1.1.dist-info}/LICENSE +0 -0
- {thailint-0.1.0.dist-info → thailint-0.1.1.dist-info}/WHEEL +0 -0
- {thailint-0.1.0.dist-info → thailint-0.1.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: thailint
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: The AI Linter - Enterprise-grade linting and governance for AI-generated code across multiple languages
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: linter,ai,code-quality,static-analysis,file-placement,governance,multi-language,cli,docker,python
|
|
@@ -90,11 +90,11 @@ pip install thai-lint
|
|
|
90
90
|
### With Docker
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
#
|
|
94
|
-
docker
|
|
93
|
+
# Pull from Docker Hub
|
|
94
|
+
docker pull washad/thailint:latest
|
|
95
95
|
|
|
96
96
|
# Run CLI
|
|
97
|
-
docker
|
|
97
|
+
docker run --rm washad/thailint:latest --help
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Quick Start
|
|
@@ -103,16 +103,16 @@ docker-compose -f docker-compose.cli.yml run cli --help
|
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
105
|
# Check file placement
|
|
106
|
-
|
|
106
|
+
thailint file-placement .
|
|
107
107
|
|
|
108
108
|
# Check nesting depth
|
|
109
|
-
|
|
109
|
+
thailint nesting src/
|
|
110
110
|
|
|
111
111
|
# With config file
|
|
112
|
-
|
|
112
|
+
thailint nesting --config .thailint.yaml src/
|
|
113
113
|
|
|
114
114
|
# JSON output for CI/CD
|
|
115
|
-
|
|
115
|
+
thailint nesting --format json src/
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### Library Mode
|
|
@@ -136,11 +136,12 @@ if violations:
|
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
138
|
# Run with volume mount
|
|
139
|
-
docker run --rm -v $(pwd):/
|
|
140
|
-
|
|
139
|
+
docker run --rm -v $(pwd):/data \
|
|
140
|
+
washad/thailint:latest file-placement /data
|
|
141
141
|
|
|
142
|
-
#
|
|
143
|
-
docker
|
|
142
|
+
# Check nesting depth
|
|
143
|
+
docker run --rm -v $(pwd):/data \
|
|
144
|
+
washad/thailint:latest nesting /data
|
|
144
145
|
```
|
|
145
146
|
|
|
146
147
|
## Configuration
|
|
@@ -150,6 +151,8 @@ Create `.thailint.yaml` in your project root:
|
|
|
150
151
|
```yaml
|
|
151
152
|
# File placement linter configuration
|
|
152
153
|
file-placement:
|
|
154
|
+
enabled: true
|
|
155
|
+
|
|
153
156
|
# Global patterns apply to entire project
|
|
154
157
|
global_patterns:
|
|
155
158
|
deny:
|
|
@@ -174,6 +177,20 @@ file-placement:
|
|
|
174
177
|
- "__pycache__/"
|
|
175
178
|
- "*.pyc"
|
|
176
179
|
- ".venv/"
|
|
180
|
+
|
|
181
|
+
# Nesting depth linter configuration
|
|
182
|
+
nesting:
|
|
183
|
+
enabled: true
|
|
184
|
+
max_nesting_depth: 4 # Maximum allowed nesting depth
|
|
185
|
+
|
|
186
|
+
# Language-specific settings (optional)
|
|
187
|
+
languages:
|
|
188
|
+
python:
|
|
189
|
+
max_depth: 4
|
|
190
|
+
typescript:
|
|
191
|
+
max_depth: 4
|
|
192
|
+
javascript:
|
|
193
|
+
max_depth: 4
|
|
177
194
|
```
|
|
178
195
|
|
|
179
196
|
**JSON format also supported** (`.thailint.json`):
|
|
@@ -181,6 +198,7 @@ file-placement:
|
|
|
181
198
|
```json
|
|
182
199
|
{
|
|
183
200
|
"file-placement": {
|
|
201
|
+
"enabled": true,
|
|
184
202
|
"directories": {
|
|
185
203
|
"src": {
|
|
186
204
|
"allow": [".*\\.py$"],
|
|
@@ -188,6 +206,14 @@ file-placement:
|
|
|
188
206
|
}
|
|
189
207
|
},
|
|
190
208
|
"ignore": ["__pycache__/", "*.pyc"]
|
|
209
|
+
},
|
|
210
|
+
"nesting": {
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"max_nesting_depth": 4,
|
|
213
|
+
"languages": {
|
|
214
|
+
"python": { "max_depth": 4 },
|
|
215
|
+
"typescript": { "max_depth": 4 }
|
|
216
|
+
}
|
|
191
217
|
}
|
|
192
218
|
}
|
|
193
219
|
```
|
|
@@ -204,13 +230,13 @@ The nesting depth linter detects deeply nested code (if/for/while/try statements
|
|
|
204
230
|
|
|
205
231
|
```bash
|
|
206
232
|
# Check nesting depth in current directory
|
|
207
|
-
|
|
233
|
+
thailint nesting .
|
|
208
234
|
|
|
209
235
|
# Use strict limit (max depth 3)
|
|
210
|
-
|
|
236
|
+
thailint nesting --max-depth 3 src/
|
|
211
237
|
|
|
212
238
|
# Get JSON output
|
|
213
|
-
|
|
239
|
+
thailint nesting --format json src/
|
|
214
240
|
```
|
|
215
241
|
|
|
216
242
|
### Configuration
|
|
@@ -311,7 +337,7 @@ pre-commit run --all-files
|
|
|
311
337
|
**On every commit:**
|
|
312
338
|
- 🚫 Prevents commits to main/master branch
|
|
313
339
|
- 🎨 Auto-fixes formatting issues
|
|
314
|
-
- ✅ Runs
|
|
340
|
+
- ✅ Runs thailint on changed files (fast)
|
|
315
341
|
|
|
316
342
|
**On every push:**
|
|
317
343
|
- 🔍 Full linting on entire codebase
|
|
@@ -339,7 +365,7 @@ repos:
|
|
|
339
365
|
language: system
|
|
340
366
|
pass_filenames: false
|
|
341
367
|
|
|
342
|
-
# Run
|
|
368
|
+
# Run thailint on changed files
|
|
343
369
|
- id: lint-changed
|
|
344
370
|
name: Lint changed files
|
|
345
371
|
entry: make lint-full FILES=changed
|
|
@@ -437,28 +463,30 @@ mypy src/
|
|
|
437
463
|
|
|
438
464
|
```bash
|
|
439
465
|
# Build Python package
|
|
440
|
-
|
|
466
|
+
poetry build
|
|
441
467
|
|
|
442
|
-
# Build Docker image
|
|
443
|
-
docker
|
|
468
|
+
# Build Docker image locally (optional)
|
|
469
|
+
docker build -t washad/thailint:latest .
|
|
444
470
|
```
|
|
445
471
|
|
|
446
472
|
## Docker Usage
|
|
447
473
|
|
|
448
474
|
```bash
|
|
449
|
-
#
|
|
450
|
-
docker
|
|
475
|
+
# Pull published image
|
|
476
|
+
docker pull washad/thailint:latest
|
|
451
477
|
|
|
452
478
|
# Run CLI help
|
|
453
|
-
docker
|
|
479
|
+
docker run --rm washad/thailint:latest --help
|
|
480
|
+
|
|
481
|
+
# Run file-placement linter
|
|
482
|
+
docker run --rm -v $(pwd):/data washad/thailint:latest file-placement /data
|
|
454
483
|
|
|
455
|
-
# Run
|
|
456
|
-
docker
|
|
484
|
+
# Run nesting linter
|
|
485
|
+
docker run --rm -v $(pwd):/data washad/thailint:latest nesting /data
|
|
457
486
|
|
|
458
|
-
# With config
|
|
459
|
-
docker
|
|
460
|
-
|
|
461
|
-
cli --config /config/config.yaml hello
|
|
487
|
+
# With custom config
|
|
488
|
+
docker run --rm -v $(pwd):/data \
|
|
489
|
+
washad/thailint:latest nesting --config /data/.thailint.yaml /data
|
|
462
490
|
```
|
|
463
491
|
|
|
464
492
|
## Documentation
|
|
@@ -566,7 +594,7 @@ thailint uses standard exit codes for CI/CD integration:
|
|
|
566
594
|
- **2** - Error occurred (invalid config, file not found, etc.)
|
|
567
595
|
|
|
568
596
|
```bash
|
|
569
|
-
|
|
597
|
+
thailint file-placement .
|
|
570
598
|
if [ $? -eq 0 ]; then
|
|
571
599
|
echo "✅ Linting passed"
|
|
572
600
|
else
|
|
@@ -21,8 +21,8 @@ src/linters/nesting/typescript_analyzer.py,sha256=rec4N0NccB9mQ2452g2hcz521-kHxS
|
|
|
21
21
|
src/orchestrator/__init__.py,sha256=XXLDJq2oaB-TpP2Y97GRnde9EkITGuFCmuLrDfxI9nY,245
|
|
22
22
|
src/orchestrator/core.py,sha256=6LqaDcSBlH-hJmTpPRDTMo-tHTzEwVRQg4sZ0wyKdE0,7092
|
|
23
23
|
src/orchestrator/language_detector.py,sha256=rHyVMApit80NTTNyDH1ObD1usKD8LjGmH3DwqNAWYGc,2736
|
|
24
|
-
thailint-0.1.
|
|
25
|
-
thailint-0.1.
|
|
26
|
-
thailint-0.1.
|
|
27
|
-
thailint-0.1.
|
|
28
|
-
thailint-0.1.
|
|
24
|
+
thailint-0.1.1.dist-info/LICENSE,sha256=kxh1J0Sb62XvhNJ6MZsVNe8PqNVJ7LHRn_EWa-T3djw,1070
|
|
25
|
+
thailint-0.1.1.dist-info/METADATA,sha256=sTkwbrhRc7fFz1ZmVAKBD1G3C-5heG7XvJrxo8JuHJo,17057
|
|
26
|
+
thailint-0.1.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
27
|
+
thailint-0.1.1.dist-info/entry_points.txt,sha256=l7DQJgU18sVLDpSaXOXY3lLhnQHQIRrSJZTQjG1cEAk,62
|
|
28
|
+
thailint-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|