linthis 0.0.1__py3-none-win_amd64.whl → 0.0.2__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.
Binary file
@@ -0,0 +1,718 @@
1
+ Metadata-Version: 2.4
2
+ Name: linthis
3
+ Version: 0.0.2
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Environment :: Console
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Rust
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Topic :: Software Development :: Quality Assurance
12
+ Summary: A fast, cross-platform multi-language linter and formatter
13
+ Keywords: lint,format,cli,code-quality,rust
14
+ Home-Page: https://github.com/zhlinh/linthis
15
+ Author: zhlinh
16
+ License: MIT
17
+ Requires-Python: >=3.8
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
+ Project-URL: Documentation, https://docs.rs/linthis
22
+
23
+ # linthis
24
+
25
+ [![Crates.io](https://img.shields.io/crates/v/linthis.svg)](https://crates.io/crates/linthis)
26
+ [![PyPI](https://img.shields.io/pypi/v/linthis.svg)](https://pypi.org/project/linthis/)
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
+
29
+ A fast, cross-platform multi-language linter and formatter written in Rust.
30
+
31
+ ## Features
32
+
33
+ - 🚀 **Single Command**: Run both linting and formatting simultaneously
34
+ - 🌍 **Multi-Language Support**: Rust, Python, TypeScript, JavaScript, Go, Java, C++, Swift, Kotlin, Lua, and more
35
+ - 🎯 **Auto-Detection**: Automatically detect programming languages used in your project
36
+ - ⚙️ **Flexible Configuration**: Support for project config, global config, and CLI parameters
37
+ - 📦 **Plugin System**: Share and reuse configurations via Git repositories
38
+ - 🎨 **Format Presets**: Support for popular code styles like Google, Airbnb, Standard
39
+ - ⚡ **Parallel Processing**: Leverage multi-core CPU for faster file processing
40
+
41
+ ## Installation
42
+
43
+ ### Method 1: Install via PyPI (Recommended for Python users)
44
+
45
+ ```bash
46
+ # Using pip
47
+ pip install linthis
48
+
49
+ # Using uv (recommended)
50
+ # pip install uv
51
+ uv pip install linthis
52
+ ```
53
+
54
+ ### Method 2: Install via Cargo (Recommended for Rust users)
55
+
56
+ ```bash
57
+ cargo install linthis
58
+ ```
59
+
60
+ ### Method 3: Build from Source
61
+
62
+ ```bash
63
+ git clone https://github.com/zhlinh/linthis.git
64
+ cd linthis
65
+ cargo build --release
66
+ ```
67
+
68
+ ## Quick Start
69
+
70
+ ### Initialize Configuration (Optional)
71
+
72
+ ```bash
73
+ # Create project configuration file
74
+ linthis init
75
+
76
+ # Create global configuration file
77
+ linthis init -g
78
+
79
+ # Initialize with pre-commit hooks
80
+ linthis init --hook prek
81
+ linthis init --hook pre-commit
82
+ linthis init --hook git
83
+
84
+ # Force overwrite existing files
85
+ linthis init --force
86
+ linthis init --hook prek -f
87
+ ```
88
+
89
+ ### Basic Usage
90
+
91
+ ```bash
92
+ # Check and format current directory (default behavior)
93
+ linthis
94
+
95
+ # Check and format specific directories
96
+ linthis -i src/
97
+ linthis --include src/ --include lib/
98
+
99
+ # Check only, no formatting
100
+ linthis -c
101
+ linthis --check-only
102
+
103
+ # Format only, no checking
104
+ linthis -f
105
+ linthis --format-only
106
+
107
+ # Check Git staged files (suitable for pre-commit hook)
108
+ linthis -s
109
+ linthis --staged
110
+ ```
111
+
112
+ ### Specify Languages
113
+
114
+ ```bash
115
+ # Check specific language
116
+ linthis -l python
117
+ linthis --lang rust
118
+
119
+ # Check multiple languages
120
+ linthis -l python,rust,cpp
121
+ linthis --lang "python,javascript,go"
122
+ ```
123
+
124
+ ### Exclude Files
125
+
126
+ ```bash
127
+ # Exclude specific patterns
128
+ linthis -e "*.test.js" -e "dist/**"
129
+ linthis --exclude "target/**" --exclude "node_modules/**"
130
+ ```
131
+
132
+ ## Plugin System
133
+
134
+ linthis supports Git-based configuration plugins for easy sharing of code standards across projects and teams.
135
+
136
+ ### Add Plugin
137
+
138
+ ```bash
139
+ # Add plugin to project config (.linthis.toml)
140
+ linthis plugin add <alias> <git-url>
141
+
142
+ # Example: Add a custom plugin
143
+ linthis plugin add myplugin https://github.com/zhlinh/linthis-plugin.git
144
+
145
+ # Add to global config (~/.linthis/config.toml)
146
+ linthis plugin add -g <alias> <git-url>
147
+ linthis plugin add --global <alias> <git-url>
148
+ ```
149
+
150
+ ### Use Plugin
151
+
152
+ ```bash
153
+ # Use plugin configuration for linting and formatting
154
+ linthis -p myplugin
155
+ linthis --plugin myplugin
156
+
157
+ # Combine with other options
158
+ linthis -p myplugin -l python -i src/
159
+ linthis --plugin myplugin --check-only
160
+ linthis --plugin myplugin --staged
161
+ ```
162
+
163
+ ### Remove Plugin
164
+
165
+ ```bash
166
+ # Remove plugin from project config
167
+ linthis plugin remove <alias>
168
+ linthis plugin remove myplugin
169
+
170
+ # Remove plugin from global config
171
+ linthis plugin remove -g <alias>
172
+ linthis plugin remove --global myplugin
173
+
174
+ # Supports flexible parameter ordering
175
+ linthis plugin remove --global myplugin
176
+ ```
177
+
178
+ ### View and Manage Plugins
179
+
180
+ ```bash
181
+ # View project config plugins
182
+ linthis plugin list
183
+
184
+ # View global config plugins
185
+ linthis plugin list -g
186
+ linthis plugin list --global
187
+
188
+ # Update plugin cache
189
+ linthis --plugin-update
190
+
191
+ # Initialize new plugin
192
+ linthis plugin init my-config
193
+
194
+ # Validate plugin structure
195
+ linthis plugin validate /path/to/plugin
196
+
197
+ # Clean plugin cache
198
+ linthis plugin clean # Interactive cleanup
199
+ linthis plugin clean --all # Clean all caches
200
+ ```
201
+
202
+ ## Configuration Files
203
+
204
+ ### Project Configuration
205
+
206
+ Create `.linthis.toml` in your project root:
207
+
208
+ ```toml
209
+ # Specify languages to check (omit for auto-detection)
210
+ languages = ["rust", "python", "javascript"]
211
+
212
+ # Exclude files and directories
213
+ excludes = [
214
+ "target/**",
215
+ "node_modules/**",
216
+ "*.generated.rs",
217
+ "dist/**"
218
+ ]
219
+
220
+ # Maximum cyclomatic complexity
221
+ max_complexity = 20
222
+
223
+ # Format preset
224
+ preset = "google" # Options: google, airbnb, standard
225
+
226
+ # Configure plugins
227
+ [plugins]
228
+ sources = [
229
+ { name = "official" },
230
+ { name = "myplugin", url = "https://github.com/zhlinh/linthis-plugin.git", ref = "main" }
231
+ ]
232
+
233
+ # Language-specific configuration
234
+ # [rust]
235
+ # max_complexity = 15
236
+
237
+ # [python]
238
+ # excludes = ["*_test.py"]
239
+ ```
240
+
241
+ ### Global Configuration
242
+
243
+ Global configuration file is located at `~/.linthis/config.toml`, with the same format as project config.
244
+
245
+ ### Configuration Priority
246
+
247
+ Configuration merge priority (from high to low):
248
+
249
+ 1. **CLI Parameters**: `--option value`
250
+ 2. **Project Config**: `.linthis.toml`
251
+ 3. **Global Config**: `~/.linthis/config.toml`
252
+ 4. **Plugin Config**: Plugins in sources array (later ones override earlier ones)
253
+ 5. **Built-in Defaults**
254
+
255
+ ## Configuration Management
256
+
257
+ linthis provides a `config` subcommand for convenient command-line configuration management without manual TOML editing.
258
+
259
+ ### Array Field Operations
260
+
261
+ Supported array fields: `includes`, `excludes`, `languages`
262
+
263
+ #### Add Values (add)
264
+
265
+ ```bash
266
+ # Add to project config
267
+ linthis config add includes "src/**"
268
+ linthis config add excludes "*.log"
269
+ linthis config add languages "rust"
270
+
271
+ # Add to global config (-g or --global)
272
+ linthis config add -g includes "lib/**"
273
+ linthis config add --global excludes "node_modules/**"
274
+
275
+ # Add multiple values (automatically deduped)
276
+ linthis config add includes "src/**"
277
+ linthis config add includes "lib/**"
278
+ ```
279
+
280
+ #### Remove Values (remove)
281
+
282
+ ```bash
283
+ # Remove from project config
284
+ linthis config remove excludes "*.log"
285
+ linthis config remove languages "python"
286
+
287
+ # Remove from global config
288
+ linthis config remove -g includes "lib/**"
289
+ linthis config remove --global excludes "target/**"
290
+ ```
291
+
292
+ #### Clear Field (clear)
293
+
294
+ ```bash
295
+ # Clear project config field
296
+ linthis config clear languages
297
+ linthis config clear includes
298
+
299
+ # Clear global config field
300
+ linthis config clear -g excludes
301
+ linthis config clear --global languages
302
+ ```
303
+
304
+ ### Scalar Field Operations
305
+
306
+ Supported scalar fields: `max_complexity`, `preset`, `verbose`
307
+
308
+ #### Set Value (set)
309
+
310
+ ```bash
311
+ # Set complexity limit
312
+ linthis config set max_complexity 15
313
+ linthis config set max_complexity 30 -g
314
+
315
+ # Set format preset (google, standard, airbnb)
316
+ linthis config set preset google
317
+ linthis config set preset airbnb --global
318
+
319
+ # Set verbose output
320
+ linthis config set verbose true
321
+ linthis config set verbose false -g
322
+ ```
323
+
324
+ #### Unset Value (unset)
325
+
326
+ ```bash
327
+ # Remove field from project config
328
+ linthis config unset max_complexity
329
+ linthis config unset preset
330
+
331
+ # Remove field from global config
332
+ linthis config unset -g verbose
333
+ linthis config unset --global max_complexity
334
+ ```
335
+
336
+ ### Query Operations
337
+
338
+ #### Get Single Field Value (get)
339
+
340
+ ```bash
341
+ # View project config field
342
+ linthis config get includes
343
+ linthis config get max_complexity
344
+ linthis config get preset
345
+
346
+ # View global config field
347
+ linthis config get -g excludes
348
+ linthis config get --global languages
349
+ ```
350
+
351
+ #### List All Configuration (list)
352
+
353
+ ```bash
354
+ # List project config
355
+ linthis config list
356
+
357
+ # List global config
358
+ linthis config list -g
359
+ linthis config list --global
360
+
361
+ # Verbose mode (show all fields including empty values)
362
+ linthis config list -v
363
+ linthis config list --verbose
364
+ linthis config list --global --verbose
365
+ ```
366
+
367
+ ### Configuration Management Examples
368
+
369
+ ```bash
370
+ # Initialize project config
371
+ linthis config add includes "src/**"
372
+ linthis config add includes "lib/**"
373
+ linthis config add excludes "target/**"
374
+ linthis config add excludes "*.log"
375
+ linthis config add languages "rust"
376
+ linthis config add languages "python"
377
+ linthis config set max_complexity 20
378
+ linthis config set preset google
379
+
380
+ # View config
381
+ linthis config list
382
+
383
+ # Adjust config
384
+ linthis config set max_complexity 15
385
+ linthis config remove excludes "*.log"
386
+ linthis config add excludes "*.tmp"
387
+
388
+ # Set global defaults
389
+ linthis config set -g max_complexity 20
390
+ linthis config add -g excludes "node_modules/**"
391
+ linthis config add -g excludes ".git/**"
392
+ ```
393
+
394
+ ### Initialize Configuration File
395
+
396
+ Use the `init` subcommand to explicitly create configuration files:
397
+
398
+ ```bash
399
+ # Create project config (.linthis.toml)
400
+ linthis init
401
+
402
+ # Create global config (~/.linthis/config.toml)
403
+ linthis init -g
404
+ linthis init --global
405
+
406
+ # Backward compatible: can also use --init flag
407
+ linthis --init
408
+ ```
409
+
410
+ ### Auto-Create Configuration Files
411
+
412
+ When using the `config` command, configuration files are automatically created if they don't exist:
413
+
414
+ - **Project Config**: Creates `.linthis.toml` in current directory
415
+ - **Global Config**: Creates `config.toml` in `~/.linthis/` directory
416
+
417
+ All modifications preserve TOML file format and comments.
418
+
419
+ ## Command Line Options
420
+
421
+ ### Main Command Options
422
+
423
+ | Short | Long | Description | Example |
424
+ | ----- | ----------------------- | ---------------------------------------- | ----------------------- |
425
+ | `-i` | `--include` | Specify files or directories to check | `-i src -i lib` |
426
+ | `-e` | `--exclude` | Exclude patterns (can be used multiple times) | `-e "*.test.js"` |
427
+ | `-p` | `--plugin` | Use plugin (alias or Git URL) | `-p myplugin` |
428
+ | `-c` | `--check-only` | Check only, no formatting | `-c` |
429
+ | `-f` | `--format-only` | Format only, no checking | `-f` |
430
+ | `-s` | `--staged` | Check only Git staged files | `-s` |
431
+ | `-l` | `--lang` | Specify languages (comma-separated) | `-l python,rust` |
432
+ | `-o` | `--output` | Output format: human, json, github-actions | `-o json` |
433
+ | `-v` | `--verbose` | Verbose output | `-v` |
434
+ | `-q` | `--quiet` | Quiet mode (errors only) | `-q` |
435
+ | | `--config` | Specify config file path | `--config custom.toml` |
436
+ | | `--init` | Initialize .linthis.toml config file | `--init` |
437
+ | | `--preset` | Format preset | `--preset google` |
438
+ | | `--plugin-update` | Force update plugin cache | `--plugin-update` |
439
+ | | `--no-default-excludes` | Disable default exclude rules | `--no-default-excludes` |
440
+ | | `--no-gitignore` | Disable .gitignore rules | `--no-gitignore` |
441
+
442
+ ### Plugin Management Subcommands
443
+
444
+ | Command | Short | Long | Description |
445
+ | -------------------------- | ----- | ----------- | ------------------------- |
446
+ | `plugin add <alias> <url>` | `-g` | `--global` | Add to global config |
447
+ | | | `--ref` | Specify Git reference |
448
+ | `plugin remove <alias>` | `-g` | `--global` | Remove from global config |
449
+ | `plugin list` | `-g` | `--global` | Show global config plugins|
450
+ | | `-v` | `--verbose` | Show detailed info |
451
+ | `plugin clean` | | `--all` | Clean all caches |
452
+ | `plugin init <name>` | | | Initialize new plugin |
453
+ | `plugin validate <path>` | | | Validate plugin structure |
454
+
455
+ ### Configuration Management Subcommands
456
+
457
+ | Command | Short | Long | Description |
458
+ | ------------------------------- | ----- | ----------- | ------------------------------- |
459
+ | `config add <field> <value>` | `-g` | `--global` | Add value to array field |
460
+ | `config remove <field> <value>` | `-g` | `--global` | Remove value from array field |
461
+ | `config clear <field>` | `-g` | `--global` | Clear array field |
462
+ | `config set <field> <value>` | `-g` | `--global` | Set scalar field value |
463
+ | `config unset <field>` | `-g` | `--global` | Remove scalar field |
464
+ | `config get <field>` | `-g` | `--global` | Get field value |
465
+ | `config list` | `-g` | `--global` | List all configuration |
466
+ | | `-v` | `--verbose` | Show detailed info (including empty values) |
467
+
468
+ **Supported array fields**: `includes`, `excludes`, `languages`
469
+ **Supported scalar fields**: `max_complexity`, `preset`, `verbose`
470
+
471
+ ### Init Subcommand
472
+
473
+ | Command | Short | Long | Description |
474
+ | ------- | ----- | ---------- | ---------------------------------- |
475
+ | `init` | `-g` | `--global` | Create global config file |
476
+ | | | `--hook` | Initialize pre-commit hooks |
477
+ | | `-i` | `--interactive` | Interactive mode for hooks setup |
478
+ | | `-f` | `--force` | Force overwrite existing files |
479
+
480
+ **Created configuration files**:
481
+ - Without `-g`: Creates `.linthis.toml` (current directory)
482
+ - With `-g`: Creates `~/.linthis/config.toml` (global config)
483
+
484
+ **Hook options**:
485
+ - `prek`: Rust-based pre-commit tool (faster)
486
+ - `pre-commit`: Python-based standard tool
487
+ - `git`: Traditional git hook
488
+
489
+ ## Supported Languages
490
+
491
+ | Language | Linter | Formatter |
492
+ | ---------- | -------------------- | ------------------ |
493
+ | Rust | clippy | rustfmt |
494
+ | Python | pylint, flake8, ruff | black, ruff |
495
+ | TypeScript | eslint | prettier |
496
+ | JavaScript | eslint | prettier |
497
+ | Go | golangci-lint | gofmt |
498
+ | Java | checkstyle | google-java-format |
499
+ | C++ | cpplint, cppcheck | clang-format |
500
+ | Swift | swiftlint | swift-format |
501
+ | Kotlin | detekt | ktlint |
502
+ | Lua | luacheck | stylua |
503
+ | Dart | dart analyze | dart format |
504
+
505
+ ## Usage Scenarios
506
+
507
+ ### Pre-commit Hook
508
+
509
+ #### Method 1: Using prek (Recommended, Faster)
510
+
511
+ [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
+
513
+ Install prek:
514
+
515
+ ```bash
516
+ # Using cargo
517
+ cargo install prek
518
+
519
+ # Or using pip
520
+ pip install prek
521
+ ```
522
+
523
+ Create `.pre-commit-config.yaml` in your project:
524
+
525
+ ```yaml
526
+ # .pre-commit-config.yaml
527
+ repos:
528
+ - repo: local
529
+ hooks:
530
+ - id: linthis
531
+ name: linthis
532
+ entry: linthis --staged --check-only
533
+ language: system
534
+ pass_filenames: false
535
+ ```
536
+
537
+ Install hook:
538
+
539
+ ```bash
540
+ prek install
541
+ ```
542
+
543
+ #### Method 2: Traditional Git Hook
544
+
545
+ Add to `.git/hooks/pre-commit`:
546
+
547
+ ```bash
548
+ #!/bin/sh
549
+ linthis --staged --check-only
550
+ ```
551
+
552
+ #### Method 3: Using pre-commit Framework
553
+
554
+ Using the [pre-commit](https://pre-commit.com/) framework:
555
+
556
+ ```yaml
557
+ # .pre-commit-config.yaml
558
+ repos:
559
+ - repo: local
560
+ hooks:
561
+ - id: linthis
562
+ name: linthis
563
+ entry: linthis --staged --check-only
564
+ language: system
565
+ pass_filenames: false
566
+ ```
567
+
568
+ ### CI/CD Integration
569
+
570
+ #### GitHub Actions
571
+
572
+ ```yaml
573
+ name: Lint
574
+
575
+ on: [push, pull_request]
576
+
577
+ jobs:
578
+ lint:
579
+ runs-on: ubuntu-latest
580
+ steps:
581
+ - uses: actions/checkout@v3
582
+ - name: Install linthis
583
+ run: pip install linthis
584
+ - name: Run linthis
585
+ run: linthis --check-only --output github-actions
586
+ ```
587
+
588
+ #### GitLab CI
589
+
590
+ ```yaml
591
+ lint:
592
+ image: rust:latest
593
+ script:
594
+ - cargo install linthis
595
+ - linthis --check-only
596
+ ```
597
+
598
+ ## Creating Custom Plugins
599
+
600
+ ### 1. Initialize Plugin
601
+
602
+ ```bash
603
+ linthis plugin init my-company-standards
604
+ cd my-company-standards
605
+ ```
606
+
607
+ ### 2. Edit Plugin Configuration
608
+
609
+ Edit `linthis-plugin.toml`:
610
+
611
+ ```toml
612
+ [plugin]
613
+ name = "my-company-standards"
614
+ version = "1.0.0"
615
+ description = "My company's coding standards"
616
+
617
+ ["language.python"]
618
+ config_count = 2
619
+
620
+ ["language.python".tools.flake8]
621
+ priority = "P0"
622
+ files = [".flake8"]
623
+
624
+ ["language.python".tools.black]
625
+ priority = "P1"
626
+ files = ["pyproject.toml"]
627
+ ```
628
+
629
+ ### 3. Add Configuration Files
630
+
631
+ ```bash
632
+ mkdir -p python
633
+ # Add your config files to corresponding language directories
634
+ cp /path/to/.flake8 python/
635
+ cp /path/to/pyproject.toml python/
636
+ ```
637
+
638
+ ### 4. Publish to Git
639
+
640
+ ```bash
641
+ git init
642
+ git add .
643
+ git commit -m "feat: Initial commit of my company coding standards"
644
+ git remote add origin git@github.com:mycompany/linthis-standards.git
645
+ git push -u origin main
646
+ ```
647
+
648
+ ### 5. Use Your Plugin
649
+
650
+ ```bash
651
+ linthis plugin add company https://github.com/mycompany/linthis-standards.git
652
+ linthis --plugin company
653
+ ```
654
+
655
+ ## FAQ
656
+
657
+ ### Q: How to specify multiple paths?
658
+
659
+ ```bash
660
+ linthis -i src -i lib -i tests
661
+ ```
662
+
663
+ ### Q: How to check only specific file types?
664
+
665
+ ```bash
666
+ linthis -l python # Only check Python files
667
+ ```
668
+
669
+ ### Q: Where is the plugin cache?
670
+
671
+ - macOS: `~/Library/Caches/linthis/plugins`
672
+ - Linux: `~/.cache/linthis/plugins`
673
+ - Windows: `%LOCALAPPDATA%\linthis\plugins`
674
+
675
+ ### Q: How to update plugins?
676
+
677
+ ```bash
678
+ linthis --plugin-update
679
+ ```
680
+
681
+ ### Q: What is the plugin Git reference (ref) used for?
682
+
683
+ The ref can specify:
684
+
685
+ - Branch name: `--ref main`
686
+ - Tag: `--ref v1.0.0`
687
+ - Commit hash: `--ref abc1234`
688
+
689
+ This allows you to lock plugin versions or use development versions.
690
+
691
+ ## Development
692
+
693
+ ### Build
694
+
695
+ ```bash
696
+ cargo build
697
+ ```
698
+
699
+ ### Test
700
+
701
+ ```bash
702
+ cargo test
703
+ ```
704
+
705
+ ### Release
706
+
707
+ ```bash
708
+ cargo build --release
709
+ ```
710
+
711
+ ## Contributing
712
+
713
+ Issues and Pull Requests are welcome!
714
+
715
+ ## License
716
+
717
+ MIT License - See [LICENSE](LICENSE) file for details
718
+
@@ -0,0 +1,4 @@
1
+ linthis-0.0.2.data/scripts/linthis.exe,sha256=eQ6f2tyQ3AcfePlGhf2IUDJJQKWRbV4WuGusL5rMQYU,3607552
2
+ linthis-0.0.2.dist-info/METADATA,sha256=lMPYaejo2ITUd1IbvLayYIwlTJxnrD6FnaNzrsw7usQ,19576
3
+ linthis-0.0.2.dist-info/WHEEL,sha256=14-pPWiwFoCAtTgD4hWnxHSfZQqe6Zt0DfwcROvwlzs,94
4
+ linthis-0.0.2.dist-info/RECORD,,
Binary file
@@ -1,115 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: linthis
3
- Version: 0.0.1
4
- Classifier: Development Status :: 3 - Alpha
5
- Classifier: Environment :: Console
6
- Classifier: Intended Audience :: Developers
7
- Classifier: License :: OSI Approved :: MIT License
8
- Classifier: Operating System :: OS Independent
9
- Classifier: Programming Language :: Rust
10
- Classifier: Programming Language :: Python :: Implementation :: CPython
11
- Classifier: Topic :: Software Development :: Quality Assurance
12
- Summary: A fast, cross-platform multi-language linter and formatter
13
- Keywords: lint,format,cli,code-quality,rust
14
- Home-Page: https://github.com/zhlinh/linthis
15
- Author: zhlinh
16
- License: MIT
17
- Requires-Python: >=3.8
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
- Project-URL: Documentation, https://docs.rs/linthis
22
-
23
- # linthis
24
-
25
- [![Crates.io](https://img.shields.io/crates/v/linthis.svg)](https://crates.io/crates/linthis)
26
- [![PyPI](https://img.shields.io/pypi/v/linthis.svg)](https://pypi.org/project/linthis/)
27
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
-
29
- A fast, cross-platform multi-language linter and formatter written in Rust.
30
-
31
- ## Installation
32
-
33
- ### From PyPI (Python users)
34
-
35
- ```bash
36
- # Using pip
37
- pip install linthis
38
-
39
- # Using uv (recommended)
40
- uv pip install linthis
41
- ```
42
-
43
- ### From crates.io (Rust users)
44
-
45
- ```bash
46
- cargo install linthis
47
- ```
48
-
49
- ## Features
50
-
51
- - Single command for both linting and formatting
52
- - Multi-language support (Rust, Python, TypeScript, JavaScript, Go, Java, C++)
53
- - Auto-detection of project languages
54
- - Configurable exclusion patterns
55
- - Hierarchical configuration (built-in, user, project, CLI)
56
- - Format presets (Google, Airbnb, Standard)
57
- - Parallel file processing for performance
58
-
59
- ## Usage
60
-
61
- ```bash
62
- # Run both lint and format checks
63
- linthis
64
-
65
- # Lint only (no formatting)
66
- linthis --check-only
67
-
68
- # Format only (no linting)
69
- linthis --format-only
70
-
71
- # Specify files or directories
72
- linthis src/main.rs src/lib.rs
73
-
74
- # Check only staged files
75
- linthis --staged
76
- ```
77
-
78
- ## Configuration
79
-
80
- Create `.linthis.toml` in your project root:
81
-
82
- ```toml
83
- # Languages to check (omit for auto-detection)
84
- languages = ["rust", "python"]
85
-
86
- # Files to exclude
87
- exclude = [
88
- "target/**",
89
- "node_modules/**",
90
- "*.generated.rs"
91
- ]
92
-
93
- # Maximum cyclomatic complexity
94
- max_complexity = 20
95
-
96
- # Formatting preset
97
- format_preset = "google"
98
- ```
99
-
100
- ## Supported Languages
101
-
102
- | Language | Linter | Formatter |
103
- |----------|--------|-----------|
104
- | Rust | clippy | rustfmt |
105
- | Python | pylint, flake8 | black |
106
- | TypeScript | eslint | prettier |
107
- | JavaScript | eslint | prettier |
108
- | Go | golint, go vet | gofmt |
109
- | Java | checkstyle | google-java-format |
110
- | C++ | cpplint, cppcheck | clang-format |
111
-
112
- ## License
113
-
114
- MIT
115
-
@@ -1,4 +0,0 @@
1
- linthis-0.0.1.data/scripts/linthis.exe,sha256=0E85CFtlhAvP5lAKpI98TuJ67xqCHTA0mt2GmAd0PVo,2546688
2
- linthis-0.0.1.dist-info/METADATA,sha256=CKUteh3HE2BDOBuzdSe_l26WgLDwe62aCk5g_ZvXJfY,2917
3
- linthis-0.0.1.dist-info/WHEEL,sha256=14-pPWiwFoCAtTgD4hWnxHSfZQqe6Zt0DfwcROvwlzs,94
4
- linthis-0.0.1.dist-info/RECORD,,