linthis 0.0.8__py3-none-win_amd64.whl → 0.0.10__py3-none-win_amd64.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.
- linthis-0.0.10.data/scripts/linthis.exe +0 -0
- {linthis-0.0.8.dist-info → linthis-0.0.10.dist-info}/METADATA +135 -96
- linthis-0.0.10.dist-info/RECORD +4 -0
- linthis-0.0.8.data/scripts/linthis.exe +0 -0
- linthis-0.0.8.dist-info/RECORD +0 -4
- {linthis-0.0.8.dist-info → linthis-0.0.10.dist-info}/WHEEL +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linthis
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.10
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -76,17 +76,20 @@ linthis init
|
|
|
76
76
|
# Create global configuration file
|
|
77
77
|
linthis init -g
|
|
78
78
|
|
|
79
|
-
#
|
|
80
|
-
linthis
|
|
79
|
+
# Install pre-commit hooks (project-level)
|
|
80
|
+
linthis hook install --type prek
|
|
81
|
+
linthis hook install --type pre-commit
|
|
82
|
+
linthis hook install --type git
|
|
81
83
|
|
|
82
|
-
#
|
|
83
|
-
linthis
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
# Install pre-push hook
|
|
85
|
+
linthis hook install --type git --event pre-push
|
|
86
|
+
|
|
87
|
+
# Install commit-msg hook
|
|
88
|
+
linthis hook install --type git --event commit-msg
|
|
86
89
|
|
|
87
90
|
# Force overwrite existing files
|
|
88
91
|
linthis init --force
|
|
89
|
-
linthis
|
|
92
|
+
linthis hook install --type prek --force
|
|
90
93
|
```
|
|
91
94
|
|
|
92
95
|
### Basic Usage
|
|
@@ -159,9 +162,13 @@ Plugins are automatically loaded when running linthis. After adding a plugin:
|
|
|
159
162
|
linthis
|
|
160
163
|
|
|
161
164
|
# Combine with other options
|
|
162
|
-
linthis -
|
|
163
|
-
|
|
164
|
-
linthis
|
|
165
|
+
linthis -i src/
|
|
166
|
+
# Check only
|
|
167
|
+
linthis -c
|
|
168
|
+
# Format only
|
|
169
|
+
linthis -f
|
|
170
|
+
# Check and format files staged
|
|
171
|
+
linthis -s
|
|
165
172
|
```
|
|
166
173
|
|
|
167
174
|
### Remove Plugin
|
|
@@ -396,6 +403,49 @@ linthis config add -g excludes "node_modules/**"
|
|
|
396
403
|
linthis config add -g excludes ".git/**"
|
|
397
404
|
```
|
|
398
405
|
|
|
406
|
+
### Configuration Migration
|
|
407
|
+
|
|
408
|
+
linthis can automatically detect and migrate existing linter/formatter configurations to linthis format.
|
|
409
|
+
|
|
410
|
+
#### Supported Tools
|
|
411
|
+
|
|
412
|
+
| Tool | Detected Files |
|
|
413
|
+
| -------- | --------------------------------------------------------------------------------------------- |
|
|
414
|
+
| ESLint | `.eslintrc.js`, `.eslintrc.json`, `.eslintrc.yml`, `.eslintrc`, `eslint.config.js`, `package.json[eslintConfig]` |
|
|
415
|
+
| Prettier | `.prettierrc`, `.prettierrc.json`, `.prettierrc.yml`, `.prettierrc.js`, `prettier.config.js`, `package.json[prettier]` |
|
|
416
|
+
| Black | `pyproject.toml[tool.black]` |
|
|
417
|
+
| isort | `pyproject.toml[tool.isort]` |
|
|
418
|
+
|
|
419
|
+
#### Migration Commands
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
# Auto-detect and migrate all configs
|
|
423
|
+
linthis config migrate
|
|
424
|
+
|
|
425
|
+
# Migrate specific tool only
|
|
426
|
+
linthis config migrate --from eslint
|
|
427
|
+
linthis config migrate --from prettier
|
|
428
|
+
linthis config migrate --from black
|
|
429
|
+
linthis config migrate --from isort
|
|
430
|
+
|
|
431
|
+
# Preview changes without applying
|
|
432
|
+
linthis config migrate --dry-run
|
|
433
|
+
|
|
434
|
+
# Create backup of original files
|
|
435
|
+
linthis config migrate --backup
|
|
436
|
+
|
|
437
|
+
# Verbose output
|
|
438
|
+
linthis config migrate --verbose
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
#### Migration Output
|
|
442
|
+
|
|
443
|
+
Migrated configurations are placed in `.linthis/configs/{language}/`:
|
|
444
|
+
|
|
445
|
+
- ESLint → `.linthis/configs/javascript/.eslintrc.js`
|
|
446
|
+
- Prettier → `.linthis/configs/javascript/prettierrc.js`
|
|
447
|
+
- Black/isort → `.linthis/configs/python/ruff.toml`
|
|
448
|
+
|
|
399
449
|
### Initialize Configuration File
|
|
400
450
|
|
|
401
451
|
Use the `init` subcommand to explicitly create configuration files:
|
|
@@ -425,71 +475,97 @@ All modifications preserve TOML file format and comments.
|
|
|
425
475
|
|
|
426
476
|
### Main Command Options
|
|
427
477
|
|
|
428
|
-
| Short | Long | Description
|
|
429
|
-
| ----- | ----------------------- |
|
|
430
|
-
| `-i` | `--include` | Specify files or directories to check
|
|
478
|
+
| Short | Long | Description | Example |
|
|
479
|
+
| ----- | ----------------------- | --------------------------------------------- | ----------------------- |
|
|
480
|
+
| `-i` | `--include` | Specify files or directories to check | `-i src -i lib` |
|
|
431
481
|
| `-e` | `--exclude` | Exclude patterns (can be used multiple times) | `-e "*.test.js"` |
|
|
432
|
-
| `-c` | `--check-only` | Check only, no formatting
|
|
433
|
-
| `-f` | `--format-only` | Format only, no checking
|
|
434
|
-
| `-s` | `--staged` | Check only Git staged files
|
|
435
|
-
| `-l` | `--lang` | Specify languages (comma-separated)
|
|
436
|
-
| `-o` | `--output` | Output format: human, json, github-actions
|
|
437
|
-
| `-v` | `--verbose` | Verbose output
|
|
438
|
-
| `-q` | `--quiet` | Quiet mode (errors only)
|
|
439
|
-
| | `--config` | Specify config file path
|
|
440
|
-
| | `--init` | Initialize .linthis.toml config file
|
|
441
|
-
| | `--preset` | Format preset
|
|
442
|
-
| | `--no-default-excludes` | Disable default exclude rules
|
|
443
|
-
| | `--no-gitignore` | Disable .gitignore rules
|
|
444
|
-
| | `--no-plugin` | Skip loading plugins, use default config
|
|
482
|
+
| `-c` | `--check-only` | Check only, no formatting | `-c` |
|
|
483
|
+
| `-f` | `--format-only` | Format only, no checking | `-f` |
|
|
484
|
+
| `-s` | `--staged` | Check only Git staged files | `-s` |
|
|
485
|
+
| `-l` | `--lang` | Specify languages (comma-separated) | `-l python,rust` |
|
|
486
|
+
| `-o` | `--output` | Output format: human, json, github-actions | `-o json` |
|
|
487
|
+
| `-v` | `--verbose` | Verbose output | `-v` |
|
|
488
|
+
| `-q` | `--quiet` | Quiet mode (errors only) | `-q` |
|
|
489
|
+
| | `--config` | Specify config file path | `--config custom.toml` |
|
|
490
|
+
| | `--init` | Initialize .linthis.toml config file | `--init` |
|
|
491
|
+
| | `--preset` | Format preset | `--preset google` |
|
|
492
|
+
| | `--no-default-excludes` | Disable default exclude rules | `--no-default-excludes` |
|
|
493
|
+
| | `--no-gitignore` | Disable .gitignore rules | `--no-gitignore` |
|
|
494
|
+
| | `--no-plugin` | Skip loading plugins, use default config | `--no-plugin` |
|
|
445
495
|
|
|
446
496
|
### Plugin Management Subcommands
|
|
447
497
|
|
|
448
|
-
| Command | Short | Long | Description
|
|
449
|
-
| -------------------------- | ----- | ----------- |
|
|
450
|
-
| `plugin add <alias> <url>` | `-g` | `--global` | Add to global config
|
|
451
|
-
| | | `--ref` | Specify Git reference
|
|
452
|
-
| `plugin remove <alias>` | `-g` | `--global` | Remove from global config
|
|
453
|
-
| `plugin list` | `-g` | `--global` | Show global config plugins|
|
|
454
|
-
| | `-v` | `--verbose` | Show detailed info
|
|
455
|
-
| `plugin clean` | | `--all` | Clean all caches
|
|
456
|
-
| `plugin init <name>` | | | Initialize new plugin
|
|
457
|
-
| `plugin validate <path>` | | | Validate plugin structure
|
|
498
|
+
| Command | Short | Long | Description |
|
|
499
|
+
| -------------------------- | ----- | ----------- | -------------------------- |
|
|
500
|
+
| `plugin add <alias> <url>` | `-g` | `--global` | Add to global config |
|
|
501
|
+
| | | `--ref` | Specify Git reference |
|
|
502
|
+
| `plugin remove <alias>` | `-g` | `--global` | Remove from global config |
|
|
503
|
+
| `plugin list` | `-g` | `--global` | Show global config plugins |
|
|
504
|
+
| | `-v` | `--verbose` | Show detailed info |
|
|
505
|
+
| `plugin clean` | | `--all` | Clean all caches |
|
|
506
|
+
| `plugin init <name>` | | | Initialize new plugin |
|
|
507
|
+
| `plugin validate <path>` | | | Validate plugin structure |
|
|
458
508
|
|
|
459
509
|
### Configuration Management Subcommands
|
|
460
510
|
|
|
461
|
-
| Command | Short | Long | Description
|
|
462
|
-
| ------------------------------- | ----- | ----------- |
|
|
463
|
-
| `config add <field> <value>` | `-g` | `--global` | Add value to array field
|
|
464
|
-
| `config remove <field> <value>` | `-g` | `--global` | Remove value from array field
|
|
465
|
-
| `config clear <field>` | `-g` | `--global` | Clear array field
|
|
466
|
-
| `config set <field> <value>` | `-g` | `--global` | Set scalar field value
|
|
467
|
-
| `config unset <field>` | `-g` | `--global` | Remove scalar field
|
|
468
|
-
| `config get <field>` | `-g` | `--global` | Get field value
|
|
469
|
-
| `config list` | `-g` | `--global` | List all configuration
|
|
511
|
+
| Command | Short | Long | Description |
|
|
512
|
+
| ------------------------------- | ----- | ----------- | ------------------------------------------- |
|
|
513
|
+
| `config add <field> <value>` | `-g` | `--global` | Add value to array field |
|
|
514
|
+
| `config remove <field> <value>` | `-g` | `--global` | Remove value from array field |
|
|
515
|
+
| `config clear <field>` | `-g` | `--global` | Clear array field |
|
|
516
|
+
| `config set <field> <value>` | `-g` | `--global` | Set scalar field value |
|
|
517
|
+
| `config unset <field>` | `-g` | `--global` | Remove scalar field |
|
|
518
|
+
| `config get <field>` | `-g` | `--global` | Get field value |
|
|
519
|
+
| `config list` | `-g` | `--global` | List all configuration |
|
|
470
520
|
| | `-v` | `--verbose` | Show detailed info (including empty values) |
|
|
521
|
+
| `config migrate` | | `--from` | Migrate from specific tool |
|
|
522
|
+
| | | `--dry-run` | Preview changes without applying |
|
|
523
|
+
| | | `--backup` | Create backup of original files |
|
|
524
|
+
| | `-v` | `--verbose` | Show detailed output |
|
|
471
525
|
|
|
472
526
|
**Supported array fields**: `includes`, `excludes`, `languages`
|
|
473
527
|
**Supported scalar fields**: `max_complexity`, `preset`, `verbose`
|
|
474
528
|
|
|
475
529
|
### Init Subcommand
|
|
476
530
|
|
|
477
|
-
| Command | Short | Long
|
|
478
|
-
| ------- | ----- |
|
|
479
|
-
| `init` | `-g` | `--global`
|
|
480
|
-
| | | `--hook`
|
|
481
|
-
| |
|
|
482
|
-
| | `-f` | `--force` | Force overwrite existing files |
|
|
531
|
+
| Command | Short | Long | Description |
|
|
532
|
+
| ------- | ----- | ------------- | -------------------------------- |
|
|
533
|
+
| `init` | `-g` | `--global` | Create global config file |
|
|
534
|
+
| | | `--with-hook` | Also install git hook after init |
|
|
535
|
+
| | | `--force` | Force overwrite existing files |
|
|
483
536
|
|
|
484
537
|
**Created configuration files**:
|
|
538
|
+
|
|
485
539
|
- Without `-g`: Creates `.linthis.toml` (current directory)
|
|
486
540
|
- With `-g`: Creates `~/.linthis/config.toml` (global config)
|
|
487
541
|
|
|
488
|
-
|
|
542
|
+
### Hook Subcommand
|
|
543
|
+
|
|
544
|
+
| Command | Short | Long | Description |
|
|
545
|
+
| ---------------- | ----- | --------------- | -------------------------------------- |
|
|
546
|
+
| `hook install` | | `--type` | Hook type (prek/pre-commit/git) |
|
|
547
|
+
| | | `--event` | Hook event (pre-commit/pre-push/commit-msg) |
|
|
548
|
+
| | `-c` | `--check-only` | Hook only runs check |
|
|
549
|
+
| | `-f` | `--format-only` | Hook only runs format |
|
|
550
|
+
| | | `--force` | Force overwrite existing hook |
|
|
551
|
+
| | `-y` | `--yes` | Non-interactive mode |
|
|
552
|
+
| `hook uninstall` | | `--event` | Hook event to uninstall |
|
|
553
|
+
| | `-y` | `--yes` | Non-interactive mode |
|
|
554
|
+
| `hook status` | | | Show git hook status |
|
|
555
|
+
| `hook check` | | | Check for hook conflicts |
|
|
556
|
+
|
|
557
|
+
**Hook types**:
|
|
558
|
+
|
|
489
559
|
- `prek`: Rust-based pre-commit tool (faster)
|
|
490
560
|
- `pre-commit`: Python-based standard tool
|
|
491
561
|
- `git`: Traditional git hook
|
|
492
562
|
|
|
563
|
+
**Hook events**:
|
|
564
|
+
|
|
565
|
+
- `pre-commit`: Run before commit (default, checks staged files)
|
|
566
|
+
- `pre-push`: Run before push (checks all files)
|
|
567
|
+
- `commit-msg`: Validate commit message format
|
|
568
|
+
|
|
493
569
|
## Supported Languages
|
|
494
570
|
|
|
495
571
|
| Language | Linter | Formatter |
|
|
@@ -510,45 +586,7 @@ All modifications preserve TOML file format and comments.
|
|
|
510
586
|
|
|
511
587
|
### Pre-commit Hook
|
|
512
588
|
|
|
513
|
-
#### Method 1:
|
|
514
|
-
|
|
515
|
-
Set up a global Git hook template that applies to all new repositories:
|
|
516
|
-
|
|
517
|
-
```bash
|
|
518
|
-
# Create global hook template
|
|
519
|
-
linthis init -g --hook-type git
|
|
520
|
-
|
|
521
|
-
# All new repos will automatically include the hook
|
|
522
|
-
git init new-project
|
|
523
|
-
cd new-project
|
|
524
|
-
# .git/hooks/pre-commit is already set up!
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
For existing repositories:
|
|
528
|
-
```bash
|
|
529
|
-
cd existing-project
|
|
530
|
-
git init # Re-apply template
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
**Features:**
|
|
534
|
-
- 🎯 **Smart Detection**: Only runs if project has linthis config
|
|
535
|
-
- 🔗 **Hook Chaining**: Supports `.git/hooks/pre-commit.local` for project-specific hooks
|
|
536
|
-
- 🚫 **Zero Interference**: Projects without linthis config are not affected
|
|
537
|
-
- ⚡ **One-time Setup**: Works for all your new repositories
|
|
538
|
-
|
|
539
|
-
**Pros:**
|
|
540
|
-
- One-time setup for all your projects
|
|
541
|
-
- No need to configure hooks per project
|
|
542
|
-
- Perfect for personal development
|
|
543
|
-
- Won't interfere with other projects or hook tools
|
|
544
|
-
|
|
545
|
-
**Cons:**
|
|
546
|
-
- Not shared with team members
|
|
547
|
-
- Requires manual setup on each machine
|
|
548
|
-
|
|
549
|
-
See [Global Hooks Guide](docs/GLOBAL_HOOKS.md) for details.
|
|
550
|
-
|
|
551
|
-
#### Method 2: Using prek (Recommended for Teams)
|
|
589
|
+
#### Method 1: Using prek (Recommended for Teams)
|
|
552
590
|
|
|
553
591
|
[prek](https://prek.j178.dev) is a high-performance Git hooks manager written in Rust, fully compatible with pre-commit config format but much faster.
|
|
554
592
|
|
|
@@ -582,7 +620,7 @@ Install hook:
|
|
|
582
620
|
prek install
|
|
583
621
|
```
|
|
584
622
|
|
|
585
|
-
#### Method
|
|
623
|
+
#### Method 2: Traditional Git Hook (Project-level)
|
|
586
624
|
|
|
587
625
|
Add to `.git/hooks/pre-commit`:
|
|
588
626
|
|
|
@@ -592,11 +630,12 @@ linthis --staged --check-only
|
|
|
592
630
|
```
|
|
593
631
|
|
|
594
632
|
Or use linthis to create it automatically:
|
|
633
|
+
|
|
595
634
|
```bash
|
|
596
|
-
linthis
|
|
635
|
+
linthis hook install --type git
|
|
597
636
|
```
|
|
598
637
|
|
|
599
|
-
#### Method
|
|
638
|
+
#### Method 3: Using pre-commit Framework
|
|
600
639
|
|
|
601
640
|
Using the [pre-commit](https://pre-commit.com/) framework:
|
|
602
641
|
|
|
@@ -717,7 +756,7 @@ linthis -l python # Only check Python files
|
|
|
717
756
|
|
|
718
757
|
- macOS: `~/Library/Caches/linthis/plugins`
|
|
719
758
|
- Linux: `~/.cache/linthis/plugins`
|
|
720
|
-
- Windows: `%LOCALAPPDATA%\linthis\plugins`
|
|
759
|
+
- Windows: `%LOCALAPPDATA%\linthis\cache\plugins`
|
|
721
760
|
|
|
722
761
|
### Q: How to update plugins?
|
|
723
762
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
linthis-0.0.10.data\scripts\linthis.exe,sha256=-Tsc4ivQeeiT-rDlsK1redft06zehK0ZPnCaBtA9ROU,10969600
|
|
2
|
+
linthis-0.0.10.dist-info\METADATA,sha256=toMpuE1AIBQQXU2T9IsiS79Ksoxfwg8xBxLinp2sRG0,23652
|
|
3
|
+
linthis-0.0.10.dist-info\WHEEL,sha256=jsSEiVNsW1dJj5gDaReR40i7mhgBjWtms6nAD6EViXU,94
|
|
4
|
+
linthis-0.0.10.dist-info\RECORD,,
|
|
Binary file
|
linthis-0.0.8.dist-info/RECORD
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
linthis-0.0.8.data\scripts\linthis.exe,sha256=3wDQShAjOELcr0AILL-CNY2mmYYpW7_cLElXUtGO89o,5782528
|
|
2
|
-
linthis-0.0.8.dist-info\METADATA,sha256=A2PVwVPNC_emY28ouYQ-0fLgssuEplJ6-sEF6zUvf2k,21154
|
|
3
|
-
linthis-0.0.8.dist-info\WHEEL,sha256=jsSEiVNsW1dJj5gDaReR40i7mhgBjWtms6nAD6EViXU,94
|
|
4
|
-
linthis-0.0.8.dist-info\RECORD,,
|
|
File without changes
|