linthis 0.0.6__py3-none-macosx_11_0_arm64.whl → 0.0.7__py3-none-macosx_11_0_arm64.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.
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linthis
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -16,9 +16,9 @@ Author: zhlinh
|
|
|
16
16
|
License: MIT
|
|
17
17
|
Requires-Python: >=3.8
|
|
18
18
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
19
|
-
Project-URL: Repository, https://github.com/zhlinh/linthis
|
|
20
|
-
Project-URL: Homepage, https://github.com/zhlinh/linthis
|
|
21
19
|
Project-URL: Documentation, https://docs.rs/linthis
|
|
20
|
+
Project-URL: Homepage, https://github.com/zhlinh/linthis
|
|
21
|
+
Project-URL: Repository, https://github.com/zhlinh/linthis
|
|
22
22
|
|
|
23
23
|
# linthis
|
|
24
24
|
|
|
@@ -76,14 +76,17 @@ linthis init
|
|
|
76
76
|
# Create global configuration file
|
|
77
77
|
linthis init -g
|
|
78
78
|
|
|
79
|
-
#
|
|
80
|
-
linthis init --hook
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
# Create global git hook template (for all new repos)
|
|
80
|
+
linthis init -g --hook-type git
|
|
81
|
+
|
|
82
|
+
# Initialize with pre-commit hooks (project-level)
|
|
83
|
+
linthis init --hook-type prek
|
|
84
|
+
linthis init --hook-type pre-commit
|
|
85
|
+
linthis init --hook-type git
|
|
83
86
|
|
|
84
87
|
# Force overwrite existing files
|
|
85
88
|
linthis init --force
|
|
86
|
-
linthis init --hook prek -f
|
|
89
|
+
linthis init --hook-type prek -f
|
|
87
90
|
```
|
|
88
91
|
|
|
89
92
|
### Basic Usage
|
|
@@ -506,7 +509,45 @@ All modifications preserve TOML file format and comments.
|
|
|
506
509
|
|
|
507
510
|
### Pre-commit Hook
|
|
508
511
|
|
|
509
|
-
#### Method 1:
|
|
512
|
+
#### Method 1: Global Hook Template (One-time Setup)
|
|
513
|
+
|
|
514
|
+
Set up a global Git hook template that applies to all new repositories:
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Create global hook template
|
|
518
|
+
linthis init -g --hook-type git
|
|
519
|
+
|
|
520
|
+
# All new repos will automatically include the hook
|
|
521
|
+
git init new-project
|
|
522
|
+
cd new-project
|
|
523
|
+
# .git/hooks/pre-commit is already set up!
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
For existing repositories:
|
|
527
|
+
```bash
|
|
528
|
+
cd existing-project
|
|
529
|
+
git init # Re-apply template
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
**Features:**
|
|
533
|
+
- 🎯 **Smart Detection**: Only runs if project has linthis config
|
|
534
|
+
- 🔗 **Hook Chaining**: Supports `.git/hooks/pre-commit.local` for project-specific hooks
|
|
535
|
+
- 🚫 **Zero Interference**: Projects without linthis config are not affected
|
|
536
|
+
- ⚡ **One-time Setup**: Works for all your new repositories
|
|
537
|
+
|
|
538
|
+
**Pros:**
|
|
539
|
+
- One-time setup for all your projects
|
|
540
|
+
- No need to configure hooks per project
|
|
541
|
+
- Perfect for personal development
|
|
542
|
+
- Won't interfere with other projects or hook tools
|
|
543
|
+
|
|
544
|
+
**Cons:**
|
|
545
|
+
- Not shared with team members
|
|
546
|
+
- Requires manual setup on each machine
|
|
547
|
+
|
|
548
|
+
See [Global Hooks Guide](docs/GLOBAL_HOOKS.md) for details.
|
|
549
|
+
|
|
550
|
+
#### Method 2: Using prek (Recommended for Teams)
|
|
510
551
|
|
|
511
552
|
[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.
|
|
512
553
|
|
|
@@ -540,7 +581,7 @@ Install hook:
|
|
|
540
581
|
prek install
|
|
541
582
|
```
|
|
542
583
|
|
|
543
|
-
#### Method
|
|
584
|
+
#### Method 3: Traditional Git Hook (Project-level)
|
|
544
585
|
|
|
545
586
|
Add to `.git/hooks/pre-commit`:
|
|
546
587
|
|
|
@@ -549,7 +590,12 @@ Add to `.git/hooks/pre-commit`:
|
|
|
549
590
|
linthis --staged --check-only
|
|
550
591
|
```
|
|
551
592
|
|
|
552
|
-
|
|
593
|
+
Or use linthis to create it automatically:
|
|
594
|
+
```bash
|
|
595
|
+
linthis init --hook-type git
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
#### Method 4: Using pre-commit Framework
|
|
553
599
|
|
|
554
600
|
Using the [pre-commit](https://pre-commit.com/) framework:
|
|
555
601
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
linthis-0.0.7.data/scripts/linthis,sha256=PW_gR7DEp4-xFJtMwoRkbZIRDZnkzN-hrzCaI9wA-xo,3914496
|
|
2
|
+
linthis-0.0.7.dist-info/METADATA,sha256=yfnQ5HERBInfY7WfNtGkLK-cjkFqy-dfQm_DRHK6rX0,20366
|
|
3
|
+
linthis-0.0.7.dist-info/WHEEL,sha256=mDDsi0mQYDXDQOcIhygpsDi2Btu7DlaI72jI0coh3j8,102
|
|
4
|
+
linthis-0.0.7.dist-info/RECORD,,
|
linthis-0.0.6.dist-info/RECORD
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
linthis-0.0.6.data/scripts/linthis,sha256=nTCwMD-XKQwRuIxDK-fSUvHfZg5N9eAmjCHkz15ncAA,3864784
|
|
2
|
-
linthis-0.0.6.dist-info/METADATA,sha256=sX5cXEZKIcAnpTkFll98bxIBqQXBOaHQdJTbr9_Ubwk,19079
|
|
3
|
-
linthis-0.0.6.dist-info/WHEEL,sha256=K6RyQz3Ufe0lRcsLav96-6nDgK8JHBgxgxxnbBDYnAE,102
|
|
4
|
-
linthis-0.0.6.dist-info/RECORD,,
|