thailint 0.1.0__tar.gz → 0.1.1__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.
- {thailint-0.1.0 → thailint-0.1.1}/PKG-INFO +58 -30
- {thailint-0.1.0 → thailint-0.1.1}/README.md +57 -29
- {thailint-0.1.0 → thailint-0.1.1}/pyproject.toml +1 -1
- {thailint-0.1.0 → thailint-0.1.1}/CHANGELOG.md +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/LICENSE +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/.ai/layout.yaml +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/api.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/cli.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/config.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/core/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/core/base.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/core/registry.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/core/types.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linter_config/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linter_config/ignore.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linter_config/loader.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/file_placement/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/file_placement/linter.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/nesting/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/nesting/config.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/nesting/linter.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/nesting/python_analyzer.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/linters/nesting/typescript_analyzer.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/orchestrator/__init__.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/orchestrator/core.py +0 -0
- {thailint-0.1.0 → thailint-0.1.1}/src/orchestrator/language_detector.py +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
|
|
@@ -58,11 +58,11 @@ pip install thai-lint
|
|
|
58
58
|
### With Docker
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
#
|
|
62
|
-
docker
|
|
61
|
+
# Pull from Docker Hub
|
|
62
|
+
docker pull washad/thailint:latest
|
|
63
63
|
|
|
64
64
|
# Run CLI
|
|
65
|
-
docker
|
|
65
|
+
docker run --rm washad/thailint:latest --help
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Quick Start
|
|
@@ -71,16 +71,16 @@ docker-compose -f docker-compose.cli.yml run cli --help
|
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
73
|
# Check file placement
|
|
74
|
-
|
|
74
|
+
thailint file-placement .
|
|
75
75
|
|
|
76
76
|
# Check nesting depth
|
|
77
|
-
|
|
77
|
+
thailint nesting src/
|
|
78
78
|
|
|
79
79
|
# With config file
|
|
80
|
-
|
|
80
|
+
thailint nesting --config .thailint.yaml src/
|
|
81
81
|
|
|
82
82
|
# JSON output for CI/CD
|
|
83
|
-
|
|
83
|
+
thailint nesting --format json src/
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
### Library Mode
|
|
@@ -104,11 +104,12 @@ if violations:
|
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
106
|
# Run with volume mount
|
|
107
|
-
docker run --rm -v $(pwd):/
|
|
108
|
-
|
|
107
|
+
docker run --rm -v $(pwd):/data \
|
|
108
|
+
washad/thailint:latest file-placement /data
|
|
109
109
|
|
|
110
|
-
#
|
|
111
|
-
docker
|
|
110
|
+
# Check nesting depth
|
|
111
|
+
docker run --rm -v $(pwd):/data \
|
|
112
|
+
washad/thailint:latest nesting /data
|
|
112
113
|
```
|
|
113
114
|
|
|
114
115
|
## Configuration
|
|
@@ -118,6 +119,8 @@ Create `.thailint.yaml` in your project root:
|
|
|
118
119
|
```yaml
|
|
119
120
|
# File placement linter configuration
|
|
120
121
|
file-placement:
|
|
122
|
+
enabled: true
|
|
123
|
+
|
|
121
124
|
# Global patterns apply to entire project
|
|
122
125
|
global_patterns:
|
|
123
126
|
deny:
|
|
@@ -142,6 +145,20 @@ file-placement:
|
|
|
142
145
|
- "__pycache__/"
|
|
143
146
|
- "*.pyc"
|
|
144
147
|
- ".venv/"
|
|
148
|
+
|
|
149
|
+
# Nesting depth linter configuration
|
|
150
|
+
nesting:
|
|
151
|
+
enabled: true
|
|
152
|
+
max_nesting_depth: 4 # Maximum allowed nesting depth
|
|
153
|
+
|
|
154
|
+
# Language-specific settings (optional)
|
|
155
|
+
languages:
|
|
156
|
+
python:
|
|
157
|
+
max_depth: 4
|
|
158
|
+
typescript:
|
|
159
|
+
max_depth: 4
|
|
160
|
+
javascript:
|
|
161
|
+
max_depth: 4
|
|
145
162
|
```
|
|
146
163
|
|
|
147
164
|
**JSON format also supported** (`.thailint.json`):
|
|
@@ -149,6 +166,7 @@ file-placement:
|
|
|
149
166
|
```json
|
|
150
167
|
{
|
|
151
168
|
"file-placement": {
|
|
169
|
+
"enabled": true,
|
|
152
170
|
"directories": {
|
|
153
171
|
"src": {
|
|
154
172
|
"allow": [".*\\.py$"],
|
|
@@ -156,6 +174,14 @@ file-placement:
|
|
|
156
174
|
}
|
|
157
175
|
},
|
|
158
176
|
"ignore": ["__pycache__/", "*.pyc"]
|
|
177
|
+
},
|
|
178
|
+
"nesting": {
|
|
179
|
+
"enabled": true,
|
|
180
|
+
"max_nesting_depth": 4,
|
|
181
|
+
"languages": {
|
|
182
|
+
"python": { "max_depth": 4 },
|
|
183
|
+
"typescript": { "max_depth": 4 }
|
|
184
|
+
}
|
|
159
185
|
}
|
|
160
186
|
}
|
|
161
187
|
```
|
|
@@ -172,13 +198,13 @@ The nesting depth linter detects deeply nested code (if/for/while/try statements
|
|
|
172
198
|
|
|
173
199
|
```bash
|
|
174
200
|
# Check nesting depth in current directory
|
|
175
|
-
|
|
201
|
+
thailint nesting .
|
|
176
202
|
|
|
177
203
|
# Use strict limit (max depth 3)
|
|
178
|
-
|
|
204
|
+
thailint nesting --max-depth 3 src/
|
|
179
205
|
|
|
180
206
|
# Get JSON output
|
|
181
|
-
|
|
207
|
+
thailint nesting --format json src/
|
|
182
208
|
```
|
|
183
209
|
|
|
184
210
|
### Configuration
|
|
@@ -279,7 +305,7 @@ pre-commit run --all-files
|
|
|
279
305
|
**On every commit:**
|
|
280
306
|
- 🚫 Prevents commits to main/master branch
|
|
281
307
|
- 🎨 Auto-fixes formatting issues
|
|
282
|
-
- ✅ Runs
|
|
308
|
+
- ✅ Runs thailint on changed files (fast)
|
|
283
309
|
|
|
284
310
|
**On every push:**
|
|
285
311
|
- 🔍 Full linting on entire codebase
|
|
@@ -307,7 +333,7 @@ repos:
|
|
|
307
333
|
language: system
|
|
308
334
|
pass_filenames: false
|
|
309
335
|
|
|
310
|
-
# Run
|
|
336
|
+
# Run thailint on changed files
|
|
311
337
|
- id: lint-changed
|
|
312
338
|
name: Lint changed files
|
|
313
339
|
entry: make lint-full FILES=changed
|
|
@@ -405,28 +431,30 @@ mypy src/
|
|
|
405
431
|
|
|
406
432
|
```bash
|
|
407
433
|
# Build Python package
|
|
408
|
-
|
|
434
|
+
poetry build
|
|
409
435
|
|
|
410
|
-
# Build Docker image
|
|
411
|
-
docker
|
|
436
|
+
# Build Docker image locally (optional)
|
|
437
|
+
docker build -t washad/thailint:latest .
|
|
412
438
|
```
|
|
413
439
|
|
|
414
440
|
## Docker Usage
|
|
415
441
|
|
|
416
442
|
```bash
|
|
417
|
-
#
|
|
418
|
-
docker
|
|
443
|
+
# Pull published image
|
|
444
|
+
docker pull washad/thailint:latest
|
|
419
445
|
|
|
420
446
|
# Run CLI help
|
|
421
|
-
docker
|
|
447
|
+
docker run --rm washad/thailint:latest --help
|
|
448
|
+
|
|
449
|
+
# Run file-placement linter
|
|
450
|
+
docker run --rm -v $(pwd):/data washad/thailint:latest file-placement /data
|
|
422
451
|
|
|
423
|
-
# Run
|
|
424
|
-
docker
|
|
452
|
+
# Run nesting linter
|
|
453
|
+
docker run --rm -v $(pwd):/data washad/thailint:latest nesting /data
|
|
425
454
|
|
|
426
|
-
# With config
|
|
427
|
-
docker
|
|
428
|
-
|
|
429
|
-
cli --config /config/config.yaml hello
|
|
455
|
+
# With custom config
|
|
456
|
+
docker run --rm -v $(pwd):/data \
|
|
457
|
+
washad/thailint:latest nesting --config /data/.thailint.yaml /data
|
|
430
458
|
```
|
|
431
459
|
|
|
432
460
|
## Documentation
|
|
@@ -534,7 +562,7 @@ thailint uses standard exit codes for CI/CD integration:
|
|
|
534
562
|
- **2** - Error occurred (invalid config, file not found, etc.)
|
|
535
563
|
|
|
536
564
|
```bash
|
|
537
|
-
|
|
565
|
+
thailint file-placement .
|
|
538
566
|
if [ $? -eq 0 ]; then
|
|
539
567
|
echo "✅ Linting passed"
|
|
540
568
|
else
|
|
@@ -17,7 +17,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
17
17
|
|
|
18
18
|
[tool.poetry]
|
|
19
19
|
name = "thailint"
|
|
20
|
-
version = "0.1.
|
|
20
|
+
version = "0.1.1"
|
|
21
21
|
description = "The AI Linter - Enterprise-grade linting and governance for AI-generated code across multiple languages"
|
|
22
22
|
authors = ["Steve Jackson"]
|
|
23
23
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|