linthis 0.0.10__tar.gz → 0.0.11__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.
- {linthis-0.0.10 → linthis-0.0.11}/.gitignore +1 -0
- linthis-0.0.11/.readthedocs.yaml +13 -0
- {linthis-0.0.10 → linthis-0.0.11}/Cargo.lock +1 -1
- {linthis-0.0.10 → linthis-0.0.11}/Cargo.toml +1 -1
- {linthis-0.0.10 → linthis-0.0.11}/PKG-INFO +1 -1
- linthis-0.0.11/docs/development/changelog.md +58 -0
- linthis-0.0.11/docs/development/contributing.md +132 -0
- linthis-0.0.11/docs/features/auto-sync.md +226 -0
- linthis-0.0.11/docs/features/git-hooks.md +368 -0
- linthis-0.0.11/docs/features/self-update.md +239 -0
- linthis-0.0.11/docs/features/watch-mode.md +78 -0
- linthis-0.0.11/docs/getting-started/configuration.md +141 -0
- linthis-0.0.11/docs/getting-started/installation.md +63 -0
- linthis-0.0.11/docs/getting-started/quickstart.md +111 -0
- linthis-0.0.11/docs/index.md +48 -0
- linthis-0.0.11/docs/languages/csharp.md +171 -0
- linthis-0.0.11/docs/languages/index.md +74 -0
- linthis-0.0.11/docs/languages/php.md +137 -0
- linthis-0.0.11/docs/languages/ruby.md +119 -0
- linthis-0.0.11/docs/languages/scala.md +163 -0
- linthis-0.0.11/docs/languages/shell.md +118 -0
- linthis-0.0.11/docs/reference/cli.md +299 -0
- {linthis-0.0.10 → linthis-0.0.11}/docs/reference/configuration.md +2 -2
- linthis-0.0.11/docs/requirements.txt +3 -0
- linthis-0.0.11/mkdocs.yml +78 -0
- {linthis-0.0.10 → linthis-0.0.11}/pyproject.toml +1 -1
- linthis-0.0.10/docs/AUTO_SYNC.md +0 -261
- linthis-0.0.10/docs/GLOBAL_HOOKS.md +0 -373
- linthis-0.0.10/docs/README.md +0 -115
- linthis-0.0.10/docs/SELF_UPDATE.md +0 -283
- {linthis-0.0.10 → linthis-0.0.11}/.github/workflows/release.yml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/CHANGELOG.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/README.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/defaults/.clang-tidy +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/defaults/config.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/dev.sh +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/docs/config-cli-design.md +0 -0
- /linthis-0.0.10/docs/ROADMAP.md → /linthis-0.0.11/docs/development/roadmap.md +0 -0
- /linthis-0.0.10/docs/plugins/creating-plugins.md → /linthis-0.0.11/docs/features/plugins.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/docs/init-hooks-design.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/cpp.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/dart.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/go.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/java.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/javascript.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/kotlin.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/lua.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/objc.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/python.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/rust.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/swift.md +0 -0
- {linthis-0.0.10/docs/guides → linthis-0.0.11/docs}/languages/typescript.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/docs/plan-ruff-integration.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/docs/tasks.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/scripts/release.sh +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/benchmark.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cache/hash.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cache/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cache/storage.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cache/types.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/cpp.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/csharp.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/dart.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/go.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/java.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/kotlin.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/lua.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/php.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/python.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/ruby.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/rust.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/scala.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/shell.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/swift.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/traits.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/checkers/typescript.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/cache.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/commands.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/doctor.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/fix.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/helpers.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/hook.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/init.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/paths.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/plugin.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/recheck.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/report.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/runner.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/cli/watch.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/cli.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/converters/eslint.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/converters/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/converters/prettier.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/converters/python.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/detect.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/parsers/eslint.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/parsers/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/parsers/prettier.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/parsers/python.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/migrate/validate.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/config/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/fixers/cpplint.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/fixers/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/fixers/source.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/cpp.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/csharp.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/dart.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/go.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/java.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/kotlin.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/lua.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/php.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/python.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/ruby.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/rust.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/scala.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/shell.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/swift.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/traits.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/formatters/typescript.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/interactive/editor.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/interactive/menu.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/interactive/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/interactive/nolint.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/interactive/quickfix.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/lib.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/lsp/diagnostics.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/lsp/document.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/lsp/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/lsp/server.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/main.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/auto_sync.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/cache.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/config_manager.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/fetcher.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/loader.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/manifest.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/plugin/registry.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/presets/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/consistency.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/html.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/statistics.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/templates.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/reports/trends.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/rules/config.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/rules/custom_checker.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/rules/filter.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/rules/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/self_update.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/templates/linter_configs.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/templates/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/templates/plugin_templates.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/templates/readme.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/app.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/event.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/ui.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/widgets/file_tree.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/widgets/help.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/widgets/issue_list.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/widgets/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/tui/widgets/status_bar.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/language.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/output.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/types.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/unicode.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/utils/walker.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/watch/debounce.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/watch/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/watch/notifications.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/watch/state.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/src/watch/watcher.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/test-plugin-check/README.md +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/test-plugin-check/linthis-plugin.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/cli_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/python/bad.py +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/python/good.py +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/python/unformatted.py +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/rust/bad.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/test-plugin/linthis-plugin.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/test-plugin/python/ruff.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/test-plugin/rust/clippy.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/test-plugin/rust/rustfmt.toml +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/us1/good.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/fixtures/us1/unformatted.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/cache_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/check_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/common.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/config_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/error_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/format_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/language_tests.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/mod.rs +0 -0
- {linthis-0.0.10 → linthis-0.0.11}/tests/integration/plugin_tests.rs +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Shell/Bash language support (ShellCheck + shfmt)
|
|
13
|
+
- Ruby language support (RuboCop)
|
|
14
|
+
- PHP language support (phpcs + php-cs-fixer)
|
|
15
|
+
- Scala language support (scalafix + scalafmt)
|
|
16
|
+
- C# language support (dotnet format)
|
|
17
|
+
- Watch mode for continuous file monitoring
|
|
18
|
+
- MkDocs documentation with Material theme
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Improved error messages for missing tools
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Fixed file pattern matching on Windows
|
|
27
|
+
|
|
28
|
+
## [0.0.10] - 2024-XX-XX
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Lua language support (luacheck + stylua)
|
|
33
|
+
- Dart language support (dart analyze + dart format)
|
|
34
|
+
- Plugin auto-sync feature
|
|
35
|
+
- Self-update functionality
|
|
36
|
+
- Configuration migration from ESLint, Prettier, Black
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Improved parallel processing performance
|
|
41
|
+
- Enhanced plugin caching mechanism
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Fixed gitignore pattern handling
|
|
46
|
+
- Fixed staged file detection
|
|
47
|
+
|
|
48
|
+
## [0.0.1] - 2024-XX-XX
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Initial release
|
|
53
|
+
- Support for Rust, Python, TypeScript, JavaScript, Go, Java, C++, Swift, Kotlin, Objective-C
|
|
54
|
+
- Plugin system
|
|
55
|
+
- Git hooks integration
|
|
56
|
+
- Format presets (Google, Airbnb, Standard)
|
|
57
|
+
- Configuration management CLI
|
|
58
|
+
- JSON and GitHub Actions output formats
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to linthis!
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Rust 1.75+ (stable)
|
|
10
|
+
- Cargo
|
|
11
|
+
|
|
12
|
+
### Clone and Build
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/zhlinh/linthis.git
|
|
16
|
+
cd linthis
|
|
17
|
+
cargo build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Run Tests
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cargo test
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Run Clippy
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cargo clippy
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Development Workflow
|
|
33
|
+
|
|
34
|
+
1. Fork the repository
|
|
35
|
+
2. Create a feature branch: `git checkout -b feature/my-feature`
|
|
36
|
+
3. Make your changes
|
|
37
|
+
4. Run tests: `cargo test`
|
|
38
|
+
5. Run clippy: `cargo clippy`
|
|
39
|
+
6. Commit your changes: `git commit -m "feat: add my feature"`
|
|
40
|
+
7. Push to your fork: `git push origin feature/my-feature`
|
|
41
|
+
8. Open a Pull Request
|
|
42
|
+
|
|
43
|
+
## Code Style
|
|
44
|
+
|
|
45
|
+
- Follow Rust standard conventions
|
|
46
|
+
- Use `rustfmt` for formatting
|
|
47
|
+
- Use `clippy` for linting
|
|
48
|
+
- Write tests for new features
|
|
49
|
+
- Document public APIs
|
|
50
|
+
|
|
51
|
+
## Commit Messages
|
|
52
|
+
|
|
53
|
+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
54
|
+
|
|
55
|
+
- `feat:` - New feature
|
|
56
|
+
- `fix:` - Bug fix
|
|
57
|
+
- `docs:` - Documentation changes
|
|
58
|
+
- `refactor:` - Code refactoring
|
|
59
|
+
- `test:` - Test changes
|
|
60
|
+
- `chore:` - Build/tooling changes
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
feat(python): add support for mypy
|
|
66
|
+
fix(cli): handle empty file list correctly
|
|
67
|
+
docs: update installation instructions
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Adding Language Support
|
|
71
|
+
|
|
72
|
+
To add support for a new language:
|
|
73
|
+
|
|
74
|
+
1. Create checker in `src/checkers/<language>.rs`
|
|
75
|
+
2. Create formatter in `src/formatters/<language>.rs`
|
|
76
|
+
3. Add language variant to `Language` enum in `src/lib.rs`
|
|
77
|
+
4. Update extension mappings
|
|
78
|
+
5. Add install hints
|
|
79
|
+
6. Write tests
|
|
80
|
+
7. Create documentation in `docs/languages/<language>.md`
|
|
81
|
+
|
|
82
|
+
See existing implementations for reference.
|
|
83
|
+
|
|
84
|
+
## Project Structure
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
src/
|
|
88
|
+
├── main.rs # CLI entry point
|
|
89
|
+
├── lib.rs # Main library
|
|
90
|
+
├── checkers/ # Language checkers
|
|
91
|
+
├── formatters/ # Language formatters
|
|
92
|
+
├── config/ # Configuration handling
|
|
93
|
+
├── plugin/ # Plugin system
|
|
94
|
+
├── cli/ # CLI commands
|
|
95
|
+
└── utils/ # Utility functions
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Testing
|
|
99
|
+
|
|
100
|
+
### Unit Tests
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cargo test
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Integration Tests
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
cargo test --test integration
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Specific Test
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cargo test test_name
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Documentation
|
|
119
|
+
|
|
120
|
+
- Update docs in `docs/` directory
|
|
121
|
+
- Use MkDocs for local preview: `mkdocs serve`
|
|
122
|
+
- Keep README.md in sync with major changes
|
|
123
|
+
|
|
124
|
+
## Questions?
|
|
125
|
+
|
|
126
|
+
- Open an issue for bugs or feature requests
|
|
127
|
+
- Start a discussion for questions
|
|
128
|
+
- Check existing issues before creating new ones
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Plugin Auto-Sync
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
linthis supports automatic plugin synchronization, inspired by oh-my-zsh's auto-update mechanism. This feature automatically checks and syncs plugin updates when running linthis, ensuring you always use the latest plugin configurations.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Configurable sync interval**: Customize how often to check for updates (default: 7 days)
|
|
10
|
+
- **Multiple sync modes**:
|
|
11
|
+
- `auto`: Sync automatically without confirmation
|
|
12
|
+
- `prompt`: Ask user before syncing (default)
|
|
13
|
+
- `disabled`: Disable auto-sync
|
|
14
|
+
- **Smart time tracking**: Uses Unix timestamps to avoid timezone issues
|
|
15
|
+
- **Smart update detection**: Only prompts when actual updates are available
|
|
16
|
+
- **Graceful user interaction**: Clear progress indicators and error handling
|
|
17
|
+
|
|
18
|
+
## Configuration
|
|
19
|
+
|
|
20
|
+
### Configuration File
|
|
21
|
+
|
|
22
|
+
Add to `.linthis/config.toml` or `~/.linthis/config.toml`:
|
|
23
|
+
|
|
24
|
+
```toml
|
|
25
|
+
# Plugin settings
|
|
26
|
+
[plugin]
|
|
27
|
+
sources = [
|
|
28
|
+
{ name = "myplugin", url = "https://github.com/your-org/myplugin.git", ref = "main" }
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
# Plugin auto-sync settings
|
|
32
|
+
[plugin_auto_sync]
|
|
33
|
+
enabled = true # Enable auto-sync
|
|
34
|
+
mode = "prompt" # Sync mode: "auto", "prompt", "disabled"
|
|
35
|
+
interval_days = 7 # Sync interval (days)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Configuration Options
|
|
39
|
+
|
|
40
|
+
#### `enabled`
|
|
41
|
+
- **Type**: Boolean
|
|
42
|
+
- **Default**: `true`
|
|
43
|
+
- **Description**: Whether to enable auto-sync
|
|
44
|
+
|
|
45
|
+
#### `mode`
|
|
46
|
+
- **Type**: String
|
|
47
|
+
- **Default**: `"prompt"`
|
|
48
|
+
- **Options**:
|
|
49
|
+
- `"auto"`: Sync automatically without user confirmation
|
|
50
|
+
- `"prompt"`: Ask user before syncing
|
|
51
|
+
- `"disabled"`: Disable auto-sync
|
|
52
|
+
|
|
53
|
+
#### `interval_days`
|
|
54
|
+
- **Type**: Integer
|
|
55
|
+
- **Default**: `7`
|
|
56
|
+
- **Description**: Number of days between sync checks
|
|
57
|
+
|
|
58
|
+
## How It Works
|
|
59
|
+
|
|
60
|
+
### Time Tracking
|
|
61
|
+
|
|
62
|
+
Auto-sync uses `~/.linthis/.plugin_sync_last_check` to store the timestamp (Unix epoch seconds) of the last sync.
|
|
63
|
+
|
|
64
|
+
### Trigger
|
|
65
|
+
|
|
66
|
+
Each time linthis runs, the system:
|
|
67
|
+
1. Loads `plugin_auto_sync` settings from config
|
|
68
|
+
2. Checks `~/.linthis/.plugin_sync_last_check` file
|
|
69
|
+
3. Calculates time since last sync
|
|
70
|
+
4. If interval exceeded, triggers sync flow
|
|
71
|
+
|
|
72
|
+
### Sync Flow
|
|
73
|
+
|
|
74
|
+
Based on configured `mode`:
|
|
75
|
+
|
|
76
|
+
- **auto mode**:
|
|
77
|
+
1. Check all plugins for updates
|
|
78
|
+
2. If updates available, automatically start sync
|
|
79
|
+
3. Display sync progress
|
|
80
|
+
4. Update timestamp
|
|
81
|
+
|
|
82
|
+
- **prompt mode**:
|
|
83
|
+
1. Check all plugins for updates
|
|
84
|
+
2. If updates available, prompt: `Updates available for plugins. Update now? [Y/n]:`
|
|
85
|
+
3. Wait for user input
|
|
86
|
+
4. If confirmed, execute sync
|
|
87
|
+
5. If declined or no updates, skip and update timestamp
|
|
88
|
+
|
|
89
|
+
- **disabled mode**:
|
|
90
|
+
- Skip all checks
|
|
91
|
+
|
|
92
|
+
## Examples
|
|
93
|
+
|
|
94
|
+
### Example 1: Default (Prompt Mode)
|
|
95
|
+
|
|
96
|
+
```toml
|
|
97
|
+
[plugin_auto_sync]
|
|
98
|
+
enabled = true
|
|
99
|
+
mode = "prompt"
|
|
100
|
+
interval_days = 7
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
When interval exceeded and updates available:
|
|
104
|
+
```bash
|
|
105
|
+
$ linthis
|
|
106
|
+
Updates available for plugins. Update now? [Y/n]: y
|
|
107
|
+
↓ Syncing project plugins...
|
|
108
|
+
↓ myplugin... ✓ @ a1b2c3d
|
|
109
|
+
✓ Synced 1 plugin(s), 1 updated
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Example 2: Auto Mode
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
[plugin_auto_sync]
|
|
116
|
+
enabled = true
|
|
117
|
+
mode = "auto"
|
|
118
|
+
interval_days = 3
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Auto-syncs every 3 days without confirmation:
|
|
122
|
+
```bash
|
|
123
|
+
$ linthis
|
|
124
|
+
↓ Syncing project plugins...
|
|
125
|
+
↓ myplugin... ✓ @ a1b2c3d
|
|
126
|
+
✓ Synced 1 plugin(s), 1 updated
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Example 3: Disable Auto-Sync
|
|
130
|
+
|
|
131
|
+
```toml
|
|
132
|
+
[plugin_auto_sync]
|
|
133
|
+
enabled = false
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Or:
|
|
137
|
+
|
|
138
|
+
```toml
|
|
139
|
+
[plugin_auto_sync]
|
|
140
|
+
mode = "disabled"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Example 4: Manual Sync
|
|
144
|
+
|
|
145
|
+
You can always manually sync regardless of auto-sync settings:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Sync project plugins
|
|
149
|
+
linthis plugin sync
|
|
150
|
+
|
|
151
|
+
# Sync global plugins
|
|
152
|
+
linthis plugin sync -g
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Comparison with oh-my-zsh
|
|
156
|
+
|
|
157
|
+
| Feature | oh-my-zsh | linthis |
|
|
158
|
+
|---------|-----------|---------|
|
|
159
|
+
| Default interval | 13 days | 7 days |
|
|
160
|
+
| Sync modes | auto, prompt, disabled | auto, prompt, disabled |
|
|
161
|
+
| Time tracking | `~/.zsh-update` | `~/.linthis/.plugin_sync_last_check` |
|
|
162
|
+
| Manual sync | `omz update` | `linthis plugin sync` |
|
|
163
|
+
| Smart detection | No | Yes (only prompts when updates exist) |
|
|
164
|
+
|
|
165
|
+
## Configuration Priority
|
|
166
|
+
|
|
167
|
+
Configuration is loaded with the following priority (highest to lowest):
|
|
168
|
+
1. Project config (`.linthis/config.toml`)
|
|
169
|
+
2. Global config (`~/.linthis/config.toml`)
|
|
170
|
+
3. Built-in defaults
|
|
171
|
+
|
|
172
|
+
## Troubleshooting
|
|
173
|
+
|
|
174
|
+
### Auto-sync not working
|
|
175
|
+
|
|
176
|
+
**Checklist**:
|
|
177
|
+
1. Confirm `plugin_auto_sync.enabled = true`
|
|
178
|
+
2. Confirm `plugin_auto_sync.mode` is not `"disabled"`
|
|
179
|
+
3. Check permissions on `~/.linthis/.plugin_sync_last_check`
|
|
180
|
+
4. Check for error messages in output
|
|
181
|
+
|
|
182
|
+
### Prompts too frequent
|
|
183
|
+
|
|
184
|
+
**Solution**: Increase `interval_days`:
|
|
185
|
+
```toml
|
|
186
|
+
[plugin_auto_sync]
|
|
187
|
+
interval_days = 14 # Change to 14 days
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Want to completely disable
|
|
191
|
+
|
|
192
|
+
**Solution**:
|
|
193
|
+
```toml
|
|
194
|
+
[plugin_auto_sync]
|
|
195
|
+
enabled = false
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Relationship with Self-Update
|
|
199
|
+
|
|
200
|
+
linthis supports both:
|
|
201
|
+
1. **Plugin Auto-Sync** (this feature): Sync plugins
|
|
202
|
+
2. **Self Auto-Update**: Update linthis itself
|
|
203
|
+
|
|
204
|
+
Both are configured and run independently:
|
|
205
|
+
```toml
|
|
206
|
+
# Sync plugins
|
|
207
|
+
[plugin_auto_sync]
|
|
208
|
+
enabled = true
|
|
209
|
+
mode = "prompt"
|
|
210
|
+
interval_days = 7
|
|
211
|
+
|
|
212
|
+
# Update linthis itself
|
|
213
|
+
[self_auto_update]
|
|
214
|
+
enabled = true
|
|
215
|
+
mode = "prompt"
|
|
216
|
+
interval_days = 7
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Execution order:
|
|
220
|
+
1. Check for linthis self-update first
|
|
221
|
+
2. Then check for plugin sync
|
|
222
|
+
|
|
223
|
+
## References
|
|
224
|
+
|
|
225
|
+
- [oh-my-zsh auto-update mechanism](https://maxchadwick.xyz/blog/a-look-at-auto-updating-in-oh-my-zsh)
|
|
226
|
+
- [oh-my-zsh settings documentation](https://github.com/ohmyzsh/ohmyzsh/wiki/Settings)
|