linthis 0.2.0__tar.gz → 0.3.0__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.
Files changed (339) hide show
  1. {linthis-0.2.0 → linthis-0.3.0}/Cargo.lock +1 -1
  2. {linthis-0.2.0 → linthis-0.3.0}/Cargo.toml +1 -1
  3. {linthis-0.2.0 → linthis-0.3.0}/PKG-INFO +1 -1
  4. linthis-0.3.0/jetbrains-linthis/README.md +219 -0
  5. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/build.gradle.kts +1 -1
  6. linthis-0.3.0/jetbrains-linthis/docs/images/settings.png +0 -0
  7. linthis-0.3.0/jetbrains-linthis/scripts/publish.sh +245 -0
  8. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/LinthisStreamConnectionProvider.kt +17 -2
  9. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/actions/LinthisFormatAction.kt +1 -1
  10. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/listeners/LinthisDocumentListener.kt +1 -1
  11. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/settings/LinthisSettings.kt +5 -0
  12. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/settings/LinthisSettingsConfigurable.kt +14 -0
  13. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/util/LinthisExecutor.kt +19 -6
  14. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/resources/META-INF/plugin.xml +64 -10
  15. {linthis-0.2.0 → linthis-0.3.0}/pyproject.toml +1 -1
  16. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/python.rs +68 -6
  17. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/traits.rs +18 -0
  18. {linthis-0.2.0 → linthis-0.3.0}/src/cli/commands.rs +36 -3
  19. {linthis-0.2.0 → linthis-0.3.0}/src/cli/fix.rs +1 -0
  20. {linthis-0.2.0 → linthis-0.3.0}/src/cli/plugin.rs +79 -117
  21. {linthis-0.2.0 → linthis-0.3.0}/src/cli/watch.rs +1 -0
  22. {linthis-0.2.0 → linthis-0.3.0}/src/config/mod.rs +1 -0
  23. linthis-0.3.0/src/config/resolver.rs +537 -0
  24. {linthis-0.2.0 → linthis-0.3.0}/src/lib.rs +42 -5
  25. {linthis-0.2.0 → linthis-0.3.0}/src/lsp/mod.rs +1 -1
  26. {linthis-0.2.0 → linthis-0.3.0}/src/lsp/server.rs +32 -8
  27. {linthis-0.2.0 → linthis-0.3.0}/src/main.rs +167 -59
  28. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/fetcher.rs +60 -4
  29. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/mod.rs +54 -1
  30. {linthis-0.2.0 → linthis-0.3.0}/src/templates/mod.rs +1 -1
  31. {linthis-0.2.0 → linthis-0.3.0}/src/templates/readme.rs +148 -0
  32. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/.vscodeignore +2 -0
  33. linthis-0.3.0/vscode-linthis/CHANGELOG.md +29 -0
  34. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/README.md +39 -12
  35. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/package-lock.json +194 -156
  36. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/package.json +8 -18
  37. linthis-0.3.0/vscode-linthis/scripts/publish.sh +255 -0
  38. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/src/extension.ts +113 -60
  39. linthis-0.2.0/jetbrains-linthis/README.md +0 -174
  40. linthis-0.2.0/jetbrains-linthis/src/main/resources/images/settings.png +0 -0
  41. linthis-0.2.0/vscode-linthis/CHANGELOG.md +0 -11
  42. {linthis-0.2.0 → linthis-0.3.0}/.github/workflows/release.yml +0 -0
  43. {linthis-0.2.0 → linthis-0.3.0}/.gitignore +0 -0
  44. {linthis-0.2.0 → linthis-0.3.0}/.readthedocs.yaml +0 -0
  45. {linthis-0.2.0 → linthis-0.3.0}/CHANGELOG.md +0 -0
  46. {linthis-0.2.0 → linthis-0.3.0}/README.md +0 -0
  47. {linthis-0.2.0 → linthis-0.3.0}/defaults/.clang-tidy +0 -0
  48. {linthis-0.2.0 → linthis-0.3.0}/defaults/config.toml +0 -0
  49. {linthis-0.2.0 → linthis-0.3.0}/dev.sh +0 -0
  50. {linthis-0.2.0 → linthis-0.3.0}/docs/assets/README.md +0 -0
  51. {linthis-0.2.0 → linthis-0.3.0}/docs/assets/favicon.svg +0 -0
  52. {linthis-0.2.0 → linthis-0.3.0}/docs/assets/logo.svg +0 -0
  53. {linthis-0.2.0 → linthis-0.3.0}/docs/assets/preview.html +0 -0
  54. {linthis-0.2.0 → linthis-0.3.0}/docs/config-cli-design.md +0 -0
  55. {linthis-0.2.0 → linthis-0.3.0}/docs/development/changelog.md +0 -0
  56. {linthis-0.2.0 → linthis-0.3.0}/docs/development/changelog.zh.md +0 -0
  57. {linthis-0.2.0 → linthis-0.3.0}/docs/development/contributing.md +0 -0
  58. {linthis-0.2.0 → linthis-0.3.0}/docs/development/contributing.zh.md +0 -0
  59. {linthis-0.2.0 → linthis-0.3.0}/docs/development/roadmap.md +0 -0
  60. {linthis-0.2.0 → linthis-0.3.0}/docs/development/roadmap.zh.md +0 -0
  61. {linthis-0.2.0 → linthis-0.3.0}/docs/editors/vscode.md +0 -0
  62. {linthis-0.2.0 → linthis-0.3.0}/docs/editors/vscode.zh.md +0 -0
  63. {linthis-0.2.0 → linthis-0.3.0}/docs/features/auto-sync.md +0 -0
  64. {linthis-0.2.0 → linthis-0.3.0}/docs/features/auto-sync.zh.md +0 -0
  65. {linthis-0.2.0 → linthis-0.3.0}/docs/features/git-hooks.md +0 -0
  66. {linthis-0.2.0 → linthis-0.3.0}/docs/features/git-hooks.zh.md +0 -0
  67. {linthis-0.2.0 → linthis-0.3.0}/docs/features/plugins.md +0 -0
  68. {linthis-0.2.0 → linthis-0.3.0}/docs/features/plugins.zh.md +0 -0
  69. {linthis-0.2.0 → linthis-0.3.0}/docs/features/self-update.md +0 -0
  70. {linthis-0.2.0 → linthis-0.3.0}/docs/features/self-update.zh.md +0 -0
  71. {linthis-0.2.0 → linthis-0.3.0}/docs/features/watch-mode.md +0 -0
  72. {linthis-0.2.0 → linthis-0.3.0}/docs/features/watch-mode.zh.md +0 -0
  73. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/configuration.md +0 -0
  74. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/configuration.zh.md +0 -0
  75. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/installation.md +0 -0
  76. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/installation.zh.md +0 -0
  77. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/quickstart.md +0 -0
  78. {linthis-0.2.0 → linthis-0.3.0}/docs/getting-started/quickstart.zh.md +0 -0
  79. {linthis-0.2.0 → linthis-0.3.0}/docs/index.md +0 -0
  80. {linthis-0.2.0 → linthis-0.3.0}/docs/index.zh.md +0 -0
  81. {linthis-0.2.0 → linthis-0.3.0}/docs/init-hooks-design.md +0 -0
  82. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/cpp.md +0 -0
  83. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/cpp.zh.md +0 -0
  84. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/csharp.md +0 -0
  85. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/csharp.zh.md +0 -0
  86. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/dart.md +0 -0
  87. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/dart.zh.md +0 -0
  88. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/go.md +0 -0
  89. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/go.zh.md +0 -0
  90. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/index.md +0 -0
  91. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/index.zh.md +0 -0
  92. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/java.md +0 -0
  93. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/java.zh.md +0 -0
  94. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/javascript.md +0 -0
  95. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/javascript.zh.md +0 -0
  96. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/kotlin.md +0 -0
  97. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/kotlin.zh.md +0 -0
  98. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/lua.md +0 -0
  99. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/lua.zh.md +0 -0
  100. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/objc.md +0 -0
  101. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/objc.zh.md +0 -0
  102. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/php.md +0 -0
  103. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/php.zh.md +0 -0
  104. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/python.md +0 -0
  105. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/python.zh.md +0 -0
  106. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/ruby.md +0 -0
  107. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/ruby.zh.md +0 -0
  108. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/rust.md +0 -0
  109. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/rust.zh.md +0 -0
  110. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/scala.md +0 -0
  111. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/scala.zh.md +0 -0
  112. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/shell.md +0 -0
  113. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/shell.zh.md +0 -0
  114. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/swift.md +0 -0
  115. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/swift.zh.md +0 -0
  116. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/typescript.md +0 -0
  117. {linthis-0.2.0 → linthis-0.3.0}/docs/languages/typescript.zh.md +0 -0
  118. {linthis-0.2.0 → linthis-0.3.0}/docs/plan-ruff-integration.md +0 -0
  119. {linthis-0.2.0 → linthis-0.3.0}/docs/reference/cli.md +0 -0
  120. {linthis-0.2.0 → linthis-0.3.0}/docs/reference/cli.zh.md +0 -0
  121. {linthis-0.2.0 → linthis-0.3.0}/docs/reference/configuration.md +0 -0
  122. {linthis-0.2.0 → linthis-0.3.0}/docs/reference/configuration.zh.md +0 -0
  123. {linthis-0.2.0 → linthis-0.3.0}/docs/requirements.txt +0 -0
  124. {linthis-0.2.0 → linthis-0.3.0}/docs/tasks.md +0 -0
  125. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/.gitignore +0 -0
  126. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/PUBLISHING.md +0 -0
  127. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/PUBLISHING.zh.md +0 -0
  128. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/docs/images/tools-menu.png +0 -0
  129. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/gradle/wrapper/gradle-wrapper.jar +0 -0
  130. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/gradle/wrapper/gradle-wrapper.properties +0 -0
  131. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/gradle.properties +0 -0
  132. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/gradlew +0 -0
  133. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/gradlew.bat +0 -0
  134. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/settings.gradle.kts +0 -0
  135. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/LinthisLanguageClient.kt +0 -0
  136. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/LinthisLanguageServerFactory.kt +0 -0
  137. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/LinthisStartupListener.kt +0 -0
  138. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/actions/LinthisLintAction.kt +0 -0
  139. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/kotlin/com/mojeter/linthis/plugin/listeners/LinthisFileOpenListener.kt +0 -0
  140. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/resources/META-INF/pluginIcon.svg +0 -0
  141. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/resources/META-INF/pluginIcon_dark.svg +0 -0
  142. {linthis-0.2.0/jetbrains-linthis/docs → linthis-0.3.0/jetbrains-linthis/src/main/resources}/images/settings.png +0 -0
  143. {linthis-0.2.0 → linthis-0.3.0}/jetbrains-linthis/src/main/resources/messages/LinthisBundle.properties +0 -0
  144. {linthis-0.2.0 → linthis-0.3.0}/mkdocs.yml +0 -0
  145. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/LICENSE +0 -0
  146. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/PUBLISHING.md +0 -0
  147. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/PUBLISHING.zh.md +0 -0
  148. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/README.md +0 -0
  149. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/doc/linthis.txt +0 -0
  150. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/lua/linthis/config.lua +0 -0
  151. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/lua/linthis/init.lua +0 -0
  152. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/plugin/linthis.vim +0 -0
  153. {linthis-0.2.0 → linthis-0.3.0}/nvim-linthis/test.sh +0 -0
  154. {linthis-0.2.0 → linthis-0.3.0}/scripts/release.sh +0 -0
  155. {linthis-0.2.0 → linthis-0.3.0}/src/ai/context.rs +0 -0
  156. {linthis-0.2.0 → linthis-0.3.0}/src/ai/mod.rs +0 -0
  157. {linthis-0.2.0 → linthis-0.3.0}/src/ai/prompts.rs +0 -0
  158. {linthis-0.2.0 → linthis-0.3.0}/src/ai/provider.rs +0 -0
  159. {linthis-0.2.0 → linthis-0.3.0}/src/ai/suggestions.rs +0 -0
  160. {linthis-0.2.0 → linthis-0.3.0}/src/benchmark.rs +0 -0
  161. {linthis-0.2.0 → linthis-0.3.0}/src/cache/hash.rs +0 -0
  162. {linthis-0.2.0 → linthis-0.3.0}/src/cache/mod.rs +0 -0
  163. {linthis-0.2.0 → linthis-0.3.0}/src/cache/storage.rs +0 -0
  164. {linthis-0.2.0 → linthis-0.3.0}/src/cache/types.rs +0 -0
  165. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/cpp.rs +0 -0
  166. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/csharp.rs +0 -0
  167. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/dart.rs +0 -0
  168. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/go.rs +0 -0
  169. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/java.rs +0 -0
  170. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/kotlin.rs +0 -0
  171. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/lua.rs +0 -0
  172. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/mod.rs +0 -0
  173. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/php.rs +0 -0
  174. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/ruby.rs +0 -0
  175. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/rust.rs +0 -0
  176. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/scala.rs +0 -0
  177. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/shell.rs +0 -0
  178. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/swift.rs +0 -0
  179. {linthis-0.2.0 → linthis-0.3.0}/src/checkers/typescript.rs +0 -0
  180. {linthis-0.2.0 → linthis-0.3.0}/src/cli/cache.rs +0 -0
  181. {linthis-0.2.0 → linthis-0.3.0}/src/cli/complexity.rs +0 -0
  182. {linthis-0.2.0 → linthis-0.3.0}/src/cli/doctor.rs +0 -0
  183. {linthis-0.2.0 → linthis-0.3.0}/src/cli/helpers.rs +0 -0
  184. {linthis-0.2.0 → linthis-0.3.0}/src/cli/hook.rs +0 -0
  185. {linthis-0.2.0 → linthis-0.3.0}/src/cli/init.rs +0 -0
  186. {linthis-0.2.0 → linthis-0.3.0}/src/cli/license.rs +0 -0
  187. {linthis-0.2.0 → linthis-0.3.0}/src/cli/mod.rs +0 -0
  188. {linthis-0.2.0 → linthis-0.3.0}/src/cli/paths.rs +0 -0
  189. {linthis-0.2.0 → linthis-0.3.0}/src/cli/recheck.rs +0 -0
  190. {linthis-0.2.0 → linthis-0.3.0}/src/cli/report.rs +0 -0
  191. {linthis-0.2.0 → linthis-0.3.0}/src/cli/runner.rs +0 -0
  192. {linthis-0.2.0 → linthis-0.3.0}/src/cli/security.rs +0 -0
  193. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/analyzer.rs +0 -0
  194. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/go.rs +0 -0
  195. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/java.rs +0 -0
  196. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/mod.rs +0 -0
  197. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/python.rs +0 -0
  198. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/rust.rs +0 -0
  199. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/languages/typescript.rs +0 -0
  200. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/metrics.rs +0 -0
  201. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/mod.rs +0 -0
  202. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/report.rs +0 -0
  203. {linthis-0.2.0 → linthis-0.3.0}/src/complexity/thresholds.rs +0 -0
  204. {linthis-0.2.0 → linthis-0.3.0}/src/config/cli.rs +0 -0
  205. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/converters/eslint.rs +0 -0
  206. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/converters/mod.rs +0 -0
  207. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/converters/prettier.rs +0 -0
  208. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/converters/python.rs +0 -0
  209. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/detect.rs +0 -0
  210. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/mod.rs +0 -0
  211. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/parsers/eslint.rs +0 -0
  212. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/parsers/mod.rs +0 -0
  213. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/parsers/prettier.rs +0 -0
  214. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/parsers/python.rs +0 -0
  215. {linthis-0.2.0 → linthis-0.3.0}/src/config/migrate/validate.rs +0 -0
  216. {linthis-0.2.0 → linthis-0.3.0}/src/fixers/cpplint.rs +0 -0
  217. {linthis-0.2.0 → linthis-0.3.0}/src/fixers/mod.rs +0 -0
  218. {linthis-0.2.0 → linthis-0.3.0}/src/fixers/source.rs +0 -0
  219. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/cpp.rs +0 -0
  220. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/csharp.rs +0 -0
  221. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/dart.rs +0 -0
  222. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/go.rs +0 -0
  223. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/java.rs +0 -0
  224. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/kotlin.rs +0 -0
  225. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/lua.rs +0 -0
  226. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/mod.rs +0 -0
  227. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/php.rs +0 -0
  228. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/python.rs +0 -0
  229. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/ruby.rs +0 -0
  230. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/rust.rs +0 -0
  231. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/scala.rs +0 -0
  232. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/shell.rs +0 -0
  233. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/swift.rs +0 -0
  234. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/traits.rs +0 -0
  235. {linthis-0.2.0 → linthis-0.3.0}/src/formatters/typescript.rs +0 -0
  236. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/ai_fix.rs +0 -0
  237. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/editor.rs +0 -0
  238. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/menu.rs +0 -0
  239. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/mod.rs +0 -0
  240. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/nolint.rs +0 -0
  241. {linthis-0.2.0 → linthis-0.3.0}/src/interactive/quickfix.rs +0 -0
  242. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/go.rs +0 -0
  243. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/java.rs +0 -0
  244. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/mod.rs +0 -0
  245. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/node.rs +0 -0
  246. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/python.rs +0 -0
  247. {linthis-0.2.0 → linthis-0.3.0}/src/license/languages/rust.rs +0 -0
  248. {linthis-0.2.0 → linthis-0.3.0}/src/license/mod.rs +0 -0
  249. {linthis-0.2.0 → linthis-0.3.0}/src/license/policy.rs +0 -0
  250. {linthis-0.2.0 → linthis-0.3.0}/src/license/report.rs +0 -0
  251. {linthis-0.2.0 → linthis-0.3.0}/src/license/scanner.rs +0 -0
  252. {linthis-0.2.0 → linthis-0.3.0}/src/license/spdx.rs +0 -0
  253. {linthis-0.2.0 → linthis-0.3.0}/src/lsp/diagnostics.rs +0 -0
  254. {linthis-0.2.0 → linthis-0.3.0}/src/lsp/document.rs +0 -0
  255. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/auto_sync.rs +0 -0
  256. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/cache.rs +0 -0
  257. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/config_manager.rs +0 -0
  258. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/loader.rs +0 -0
  259. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/manifest.rs +0 -0
  260. {linthis-0.2.0 → linthis-0.3.0}/src/plugin/registry.rs +0 -0
  261. {linthis-0.2.0 → linthis-0.3.0}/src/presets/mod.rs +0 -0
  262. {linthis-0.2.0 → linthis-0.3.0}/src/reports/consistency.rs +0 -0
  263. {linthis-0.2.0 → linthis-0.3.0}/src/reports/html.rs +0 -0
  264. {linthis-0.2.0 → linthis-0.3.0}/src/reports/mod.rs +0 -0
  265. {linthis-0.2.0 → linthis-0.3.0}/src/reports/statistics.rs +0 -0
  266. {linthis-0.2.0 → linthis-0.3.0}/src/reports/templates.rs +0 -0
  267. {linthis-0.2.0 → linthis-0.3.0}/src/reports/trends.rs +0 -0
  268. {linthis-0.2.0 → linthis-0.3.0}/src/rules/config.rs +0 -0
  269. {linthis-0.2.0 → linthis-0.3.0}/src/rules/custom_checker.rs +0 -0
  270. {linthis-0.2.0 → linthis-0.3.0}/src/rules/filter.rs +0 -0
  271. {linthis-0.2.0 → linthis-0.3.0}/src/rules/mod.rs +0 -0
  272. {linthis-0.2.0 → linthis-0.3.0}/src/security/advisories.rs +0 -0
  273. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/go.rs +0 -0
  274. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/java.rs +0 -0
  275. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/mod.rs +0 -0
  276. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/node.rs +0 -0
  277. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/python.rs +0 -0
  278. {linthis-0.2.0 → linthis-0.3.0}/src/security/languages/rust.rs +0 -0
  279. {linthis-0.2.0 → linthis-0.3.0}/src/security/mod.rs +0 -0
  280. {linthis-0.2.0 → linthis-0.3.0}/src/security/report.rs +0 -0
  281. {linthis-0.2.0 → linthis-0.3.0}/src/security/scanner.rs +0 -0
  282. {linthis-0.2.0 → linthis-0.3.0}/src/security/vulnerability.rs +0 -0
  283. {linthis-0.2.0 → linthis-0.3.0}/src/self_update.rs +0 -0
  284. {linthis-0.2.0 → linthis-0.3.0}/src/templates/linter_configs.rs +0 -0
  285. {linthis-0.2.0 → linthis-0.3.0}/src/templates/plugin_templates.rs +0 -0
  286. {linthis-0.2.0 → linthis-0.3.0}/src/tui/app.rs +0 -0
  287. {linthis-0.2.0 → linthis-0.3.0}/src/tui/event.rs +0 -0
  288. {linthis-0.2.0 → linthis-0.3.0}/src/tui/mod.rs +0 -0
  289. {linthis-0.2.0 → linthis-0.3.0}/src/tui/ui.rs +0 -0
  290. {linthis-0.2.0 → linthis-0.3.0}/src/tui/widgets/file_tree.rs +0 -0
  291. {linthis-0.2.0 → linthis-0.3.0}/src/tui/widgets/help.rs +0 -0
  292. {linthis-0.2.0 → linthis-0.3.0}/src/tui/widgets/issue_list.rs +0 -0
  293. {linthis-0.2.0 → linthis-0.3.0}/src/tui/widgets/mod.rs +0 -0
  294. {linthis-0.2.0 → linthis-0.3.0}/src/tui/widgets/status_bar.rs +0 -0
  295. {linthis-0.2.0 → linthis-0.3.0}/src/utils/language.rs +0 -0
  296. {linthis-0.2.0 → linthis-0.3.0}/src/utils/mod.rs +0 -0
  297. {linthis-0.2.0 → linthis-0.3.0}/src/utils/output.rs +0 -0
  298. {linthis-0.2.0 → linthis-0.3.0}/src/utils/types.rs +0 -0
  299. {linthis-0.2.0 → linthis-0.3.0}/src/utils/unicode.rs +0 -0
  300. {linthis-0.2.0 → linthis-0.3.0}/src/utils/walker.rs +0 -0
  301. {linthis-0.2.0 → linthis-0.3.0}/src/watch/debounce.rs +0 -0
  302. {linthis-0.2.0 → linthis-0.3.0}/src/watch/mod.rs +0 -0
  303. {linthis-0.2.0 → linthis-0.3.0}/src/watch/notifications.rs +0 -0
  304. {linthis-0.2.0 → linthis-0.3.0}/src/watch/state.rs +0 -0
  305. {linthis-0.2.0 → linthis-0.3.0}/src/watch/watcher.rs +0 -0
  306. {linthis-0.2.0 → linthis-0.3.0}/test-plugin-check/README.md +0 -0
  307. {linthis-0.2.0 → linthis-0.3.0}/test-plugin-check/linthis-plugin.toml +0 -0
  308. {linthis-0.2.0 → linthis-0.3.0}/tests/cli_tests.rs +0 -0
  309. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/python/bad.py +0 -0
  310. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/python/good.py +0 -0
  311. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/python/unformatted.py +0 -0
  312. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/rust/bad.rs +0 -0
  313. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/test-plugin/linthis-plugin.toml +0 -0
  314. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/test-plugin/python/ruff.toml +0 -0
  315. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/test-plugin/rust/clippy.toml +0 -0
  316. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/test-plugin/rust/rustfmt.toml +0 -0
  317. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/us1/good.rs +0 -0
  318. {linthis-0.2.0 → linthis-0.3.0}/tests/fixtures/us1/unformatted.rs +0 -0
  319. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/cache_tests.rs +0 -0
  320. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/check_tests.rs +0 -0
  321. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/common.rs +0 -0
  322. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/config_tests.rs +0 -0
  323. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/error_tests.rs +0 -0
  324. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/format_tests.rs +0 -0
  325. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/language_tests.rs +0 -0
  326. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/mod.rs +0 -0
  327. {linthis-0.2.0 → linthis-0.3.0}/tests/integration/plugin_tests.rs +0 -0
  328. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/.gitignore +0 -0
  329. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/.linthis.toml +0 -0
  330. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/LICENSE +0 -0
  331. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/PUBLISHING.md +0 -0
  332. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/PUBLISHING.zh.md +0 -0
  333. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/icon.png +0 -0
  334. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/icon.svg +0 -0
  335. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/src/test/runTest.ts +0 -0
  336. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/src/test/suite/extension.test.ts +0 -0
  337. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/src/test/suite/index.ts +0 -0
  338. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/tsconfig.json +0 -0
  339. {linthis-0.2.0 → linthis-0.3.0}/vscode-linthis/webpack.config.js +0 -0
@@ -1330,7 +1330,7 @@ dependencies = [
1330
1330
 
1331
1331
  [[package]]
1332
1332
  name = "linthis"
1333
- version = "0.2.0"
1333
+ version = "0.3.0"
1334
1334
  dependencies = [
1335
1335
  "anyhow",
1336
1336
  "async-trait",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "linthis"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  edition = "2021"
5
5
  authors = ["zhlinh"]
6
6
  description = "A fast, cross-platform multi-language linter and formatter"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linthis
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -0,0 +1,219 @@
1
+ # Linthis for JetBrains IDEs
2
+
3
+ Multi-language linter and formatter plugin for JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, GoLand, CLion, etc.).
4
+
5
+ ## Features
6
+
7
+ - **Real-time Diagnostics**: See linting issues as you type
8
+ - **Format on Save**: Automatically format code when saving files
9
+ - **Multi-language Support**: 18+ programming languages supported
10
+ - **Quick Fixes**: Apply suggestions from linters
11
+ - **Configurable**: Customize via `.linthis.toml`
12
+
13
+ ## Supported Languages
14
+
15
+ | Language | Linter | Formatter |
16
+ | --------------------- | ------------- | ------------------ |
17
+ | Rust | clippy | rustfmt |
18
+ | Python | ruff | ruff/black |
19
+ | TypeScript/JavaScript | ESLint | Prettier |
20
+ | Go | golangci-lint | gofmt |
21
+ | Java | checkstyle | google-java-format |
22
+ | C/C++ | clang-tidy | clang-format |
23
+ | Objective-C | clang-tidy | clang-format |
24
+ | Swift | SwiftLint | swift-format |
25
+ | Kotlin | detekt | ktlint |
26
+ | Lua | luacheck | stylua |
27
+ | Dart | dart analyze | dart format |
28
+ | Shell/Bash | shellcheck | shfmt |
29
+ | Ruby | rubocop | rubocop |
30
+ | PHP | phpcs | php-cs-fixer |
31
+ | Scala | scalafix | scalafmt |
32
+ | C# | dotnet format | dotnet format |
33
+ | And more... | | |
34
+
35
+ ## Requirements
36
+
37
+ ### 1. Install Linthis CLI
38
+
39
+ ```bash
40
+ # Using pip
41
+ pip install linthis
42
+ # Or use uv (recommended)
43
+ uv pip install
44
+
45
+ # Or using cargo
46
+ cargo install linthis
47
+ ```
48
+
49
+ ### 2. Install LSP4IJ Plugin
50
+
51
+ This plugin requires the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin for Language Server Protocol support.
52
+
53
+ Install from JetBrains Marketplace:
54
+
55
+ 1. Open Settings/Preferences → Plugins
56
+ 2. Search for "LSP4IJ"
57
+ 3. Click Install
58
+
59
+ ### 3. Install Linthis Plugin
60
+
61
+ #### From JetBrains Marketplace (Coming Soon)
62
+
63
+ 1. Open Settings/Preferences → Plugins
64
+ 2. Search for "Linthis"
65
+ 3. Click Install
66
+
67
+ #### From Local Build
68
+
69
+ 1. Build the plugin: `./gradlew buildPlugin`
70
+ 2. Install from disk: Settings → Plugins → ⚙️ → Install Plugin from Disk
71
+ 3. Select `build/distributions/jetbrains-linthis-*.zip`
72
+
73
+ ## Configuration
74
+
75
+ Create a `.linthis.toml` file in your project root:
76
+
77
+ ```toml
78
+ [global]
79
+ # Enabled languages
80
+ enabled_languages = ["rust", "python", "typescript"]
81
+
82
+ # Format on save
83
+ format_on_save = true
84
+
85
+ # Cache settings
86
+ cache_enabled = true
87
+
88
+ [python]
89
+ # Python-specific settings
90
+ lint_tool = "ruff"
91
+ format_tool = "ruff"
92
+
93
+ [rust]
94
+ # Rust-specific settings
95
+ lint_tool = "clippy"
96
+ format_tool = "rustfmt"
97
+ ```
98
+
99
+ ## Usage
100
+
101
+ ### Quick Start
102
+
103
+ 1. **Install prerequisites** (LSP4IJ plugin + Linthis CLI)
104
+ 2. **Install Linthis plugin**
105
+ 3. **Open a supported file** - The LSP server starts automatically
106
+ 4. **View diagnostics** - Issues appear in editor gutter and Problems view
107
+
108
+ ### Automatic Features
109
+
110
+ Once installed, the plugin will automatically:
111
+
112
+ - **Start the LSP server** when you open a supported file
113
+ - **Show diagnostics** in the editor gutter and Problems view
114
+ - **Format on save** (if enabled in settings)
115
+ - **Lint on file open** (if enabled in settings)
116
+
117
+ ### Menu Actions
118
+
119
+ Access linting and formatting actions from **Tools → Linthis**:
120
+
121
+ ![Tools Menu](docs/images/tools-menu.png)
122
+
123
+ | Action | Description |
124
+ | ----------------------- | ----------------------------------------------------- |
125
+ | **Lint Current File** | Manually trigger linting on the active file |
126
+ | **Format Current File** | Format the active file using the configured formatter |
127
+
128
+ Additional menu actions:
129
+
130
+ - **Code → Reformat Code**: Also triggers LSP-based formatting
131
+ - **View → Tool Windows → Problems**: Show all diagnostics
132
+
133
+ ### Plugin Settings
134
+
135
+ Configure Linthis in **Settings/Preferences → Tools → Linthis**:
136
+
137
+ ![Settings](docs/images/settings.png)
138
+
139
+ | Setting | Default | Description |
140
+ | -------------------- | ------- | --------------------------------- |
141
+ | Lint on file open | On | Run linter when opening a file |
142
+ | Lint on save | On | Run linter when saving a file |
143
+ | Format on save | Off | Auto-format file when saving |
144
+ | Linthis path | (auto) | Custom path to linthis executable |
145
+ | Additional arguments | (empty) | Extra arguments passed to linthis |
146
+
147
+ ### Keyboard Shortcuts
148
+
149
+ To configure shortcuts:
150
+
151
+ 1. Open **Settings/Preferences → Keymap**
152
+ 2. Search for "Linthis"
153
+ 3. Right-click on an action and select "Add Keyboard Shortcut"
154
+
155
+ Suggested shortcuts (not set by default to avoid conflicts):
156
+
157
+ - Lint Current File: `Ctrl+Shift+;` / `Cmd+Shift+;`
158
+ - Format Current File: `Ctrl+Shift+'` / `Cmd+Shift+'`
159
+
160
+ ### Viewing Diagnostics
161
+
162
+ Linting issues are displayed in multiple places:
163
+
164
+ 1. **Editor Gutter** - Icons indicate warnings/errors on specific lines
165
+ 2. **Problems Tool Window** - View → Tool Windows → Problems
166
+ 3. **Inline Highlights** - Underlines in the code editor
167
+ 4. **Hover Tooltips** - Hover over highlighted code to see details
168
+
169
+ ### LSP Server Status
170
+
171
+ Check the Language Server status at **View → Tool Windows → Language Servers**. You can:
172
+
173
+ - See if Linthis server is running
174
+ - View server logs
175
+ - Restart the server if needed
176
+
177
+ ## Building from Source
178
+
179
+ ```bash
180
+ # Clone the repository
181
+ git clone https://github.com/zhlinh/linthis.git
182
+ cd linthis/jetbrains-linthis
183
+
184
+ # Build the plugin
185
+ ./gradlew buildPlugin
186
+
187
+ # Run in a sandbox IDE for testing
188
+ ./gradlew runIde
189
+ ```
190
+
191
+ ## Troubleshooting
192
+
193
+ ### Linthis not found
194
+
195
+ If you see "Linthis not found" notification:
196
+
197
+ 1. Verify linthis is installed: `linthis --version`
198
+ 2. Ensure linthis is in your PATH
199
+ 3. Restart the IDE
200
+
201
+ ### No diagnostics showing
202
+
203
+ 1. Check if the file type is supported
204
+ 2. Verify `.linthis.toml` configuration
205
+ 3. View → Tool Windows → Language Servers to check server status
206
+
207
+ ### LSP server not starting
208
+
209
+ 1. Open Help → Diagnostic Tools → Debug Log Settings
210
+ 2. Add `#com.linthis` to enable debug logging
211
+ 3. Check idea.log for errors
212
+
213
+ ## License
214
+
215
+ MIT License - see [LICENSE](../LICENSE) for details.
216
+
217
+ ## Contributing
218
+
219
+ Contributions are welcome! Please see the [main repository](https://github.com/zhlinh/linthis) for guidelines.
@@ -5,7 +5,7 @@ plugins {
5
5
  }
6
6
 
7
7
  group = "com.mojeter.linthis"
8
- version = "0.1.0"
8
+ version = "0.2.0"
9
9
 
10
10
  repositories {
11
11
  mavenCentral()
@@ -0,0 +1,245 @@
1
+ #!/bin/bash
2
+ # Copyright 2024 zhlinh and linthis Project Authors. All rights reserved.
3
+ # Use of this source code is governed by a MIT-style license.
4
+ #
5
+ # Publish linthis plugin to JetBrains Marketplace
6
+ #
7
+ # Prerequisites:
8
+ # 1. JDK 17+ installed
9
+ # 2. JETBRAINS_MARKETPLACE_TOKEN environment variable set
10
+ # Get token from: https://plugins.jetbrains.com/author/me/tokens
11
+ #
12
+ # For signed releases, also set:
13
+ # - CERTIFICATE_CHAIN: Plugin signing certificate chain
14
+ # - PRIVATE_KEY: Plugin signing private key
15
+ # - PRIVATE_KEY_PASSWORD: Private key password
16
+ #
17
+ # Usage:
18
+ # ./scripts/publish.sh # Build, sign, and publish
19
+ # ./scripts/publish.sh --patch # Bump patch version, commit, push, then publish
20
+ # ./scripts/publish.sh --minor # Bump minor version, commit, push, then publish
21
+ # ./scripts/publish.sh --major # Bump major version, commit, push, then publish
22
+ # ./scripts/publish.sh --patch --build # Bump version and build only (no publish)
23
+ # ./scripts/publish.sh --build # Build only (no version bump, no publish)
24
+ # ./scripts/publish.sh --dry-run # Build and sign, but don't publish
25
+
26
+ set -e
27
+
28
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
29
+ PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
30
+
31
+ cd "$PROJECT_DIR"
32
+
33
+ # Colors for output
34
+ RED='\033[0;31m'
35
+ GREEN='\033[0;32m'
36
+ YELLOW='\033[1;33m'
37
+ NC='\033[0m' # No Color
38
+
39
+ log_info() {
40
+ echo -e "${GREEN}[INFO]${NC} $1"
41
+ }
42
+
43
+ log_warn() {
44
+ echo -e "${YELLOW}[WARN]${NC} $1"
45
+ }
46
+
47
+ log_error() {
48
+ echo -e "${RED}[ERROR]${NC} $1"
49
+ }
50
+
51
+ # Get current version from build.gradle.kts
52
+ get_current_version() {
53
+ grep 'version = ' build.gradle.kts | head -1 | sed 's/.*"\(.*\)".*/\1/'
54
+ }
55
+
56
+ # Bump version based on type
57
+ bump_version() {
58
+ local current="$1"
59
+ local bump_type="$2"
60
+
61
+ IFS='.' read -r major minor patch <<< "$current"
62
+
63
+ case "$bump_type" in
64
+ --major)
65
+ echo "$((major + 1)).0.0"
66
+ ;;
67
+ --minor)
68
+ echo "${major}.$((minor + 1)).0"
69
+ ;;
70
+ --patch)
71
+ echo "${major}.${minor}.$((patch + 1))"
72
+ ;;
73
+ *)
74
+ echo "$current"
75
+ ;;
76
+ esac
77
+ }
78
+
79
+ # Update version in build.gradle.kts
80
+ update_version() {
81
+ local old_version="$1"
82
+ local new_version="$2"
83
+
84
+ if [[ "$OSTYPE" == "darwin"* ]]; then
85
+ sed -i '' "s/version = \"$old_version\"/version = \"$new_version\"/" build.gradle.kts
86
+ else
87
+ sed -i "s/version = \"$old_version\"/version = \"$new_version\"/" build.gradle.kts
88
+ fi
89
+ log_info "Updated build.gradle.kts: $old_version -> $new_version"
90
+ }
91
+
92
+ # Parse arguments
93
+ BUILD_ONLY=false
94
+ DRY_RUN=false
95
+ BUMP_TYPE=""
96
+
97
+ for arg in "$@"; do
98
+ case $arg in
99
+ --patch|--minor|--major)
100
+ BUMP_TYPE="$arg"
101
+ ;;
102
+ --build)
103
+ BUILD_ONLY=true
104
+ ;;
105
+ --dry-run)
106
+ DRY_RUN=true
107
+ ;;
108
+ --help|-h)
109
+ echo "Usage: $0 [OPTIONS]"
110
+ echo ""
111
+ echo "Version bump options:"
112
+ echo " --patch Bump patch version (0.1.0 -> 0.1.1)"
113
+ echo " --minor Bump minor version (0.1.0 -> 0.2.0)"
114
+ echo " --major Bump major version (0.1.0 -> 1.0.0)"
115
+ echo ""
116
+ echo "Build options:"
117
+ echo " --build Build only (no publish)"
118
+ echo " --dry-run Build and sign, but don't publish"
119
+ echo " --help, -h Show this help message"
120
+ echo ""
121
+ echo "Examples:"
122
+ echo " $0 # Build and publish current version"
123
+ echo " $0 --patch # Bump patch, commit, push, then publish"
124
+ echo " $0 --minor --build # Bump minor, commit, push, build only"
125
+ echo " $0 --build # Build current version only"
126
+ echo ""
127
+ echo "Environment variables:"
128
+ echo " JETBRAINS_MARKETPLACE_TOKEN Required for publishing"
129
+ echo " CERTIFICATE_CHAIN Optional: for signed releases"
130
+ echo " PRIVATE_KEY Optional: for signed releases"
131
+ echo " PRIVATE_KEY_PASSWORD Optional: for signed releases"
132
+ echo ""
133
+ echo "Current version: $(get_current_version)"
134
+ exit 0
135
+ ;;
136
+ *)
137
+ log_error "Unknown option: $arg"
138
+ exit 1
139
+ ;;
140
+ esac
141
+ done
142
+
143
+ # Check prerequisites
144
+ log_info "Checking prerequisites..."
145
+
146
+ if ! command -v java &> /dev/null; then
147
+ log_error "Java is not installed. Please install JDK 17+."
148
+ exit 1
149
+ fi
150
+
151
+ JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1)
152
+ if [ "$JAVA_VERSION" -lt 17 ]; then
153
+ log_error "Java 17+ is required. Current version: $JAVA_VERSION"
154
+ exit 1
155
+ fi
156
+
157
+ log_info "Java version: $(java -version 2>&1 | head -n 1)"
158
+
159
+ # Handle version bump if requested
160
+ CURRENT_VERSION=$(get_current_version)
161
+
162
+ if [ -n "$BUMP_TYPE" ]; then
163
+ NEW_VERSION=$(bump_version "$CURRENT_VERSION" "$BUMP_TYPE")
164
+
165
+ if [ "$CURRENT_VERSION" == "$NEW_VERSION" ]; then
166
+ log_warn "Version is already $CURRENT_VERSION"
167
+ else
168
+ log_info "Bumping version: $CURRENT_VERSION -> $NEW_VERSION"
169
+ update_version "$CURRENT_VERSION" "$NEW_VERSION"
170
+
171
+ # Commit and push the version bump
172
+ log_info "Committing version bump..."
173
+ git add build.gradle.kts
174
+ git commit -m "chore(jetbrains-linthis): bump version to $NEW_VERSION"
175
+
176
+ log_info "Pushing to remote..."
177
+ git push
178
+
179
+ log_info "Version bump committed and pushed!"
180
+ CURRENT_VERSION="$NEW_VERSION"
181
+ fi
182
+ fi
183
+
184
+ VERSION="$CURRENT_VERSION"
185
+ log_info "Plugin version: $VERSION"
186
+
187
+ # Clean previous builds
188
+ log_info "Cleaning previous builds..."
189
+ ./gradlew clean
190
+
191
+ # Build the plugin
192
+ log_info "Building plugin..."
193
+ ./gradlew buildPlugin
194
+
195
+ # Verify build output
196
+ BUILD_OUTPUT="build/distributions"
197
+ if [ ! -d "$BUILD_OUTPUT" ]; then
198
+ log_error "Build output directory not found: $BUILD_OUTPUT"
199
+ exit 1
200
+ fi
201
+
202
+ ZIP_FILE=$(ls "$BUILD_OUTPUT"/*.zip 2>/dev/null | head -1)
203
+ if [ -z "$ZIP_FILE" ]; then
204
+ log_error "No plugin ZIP file found in $BUILD_OUTPUT"
205
+ exit 1
206
+ fi
207
+
208
+ log_info "Built: $ZIP_FILE"
209
+
210
+ if [ "$BUILD_ONLY" = true ]; then
211
+ log_info "Build completed (--build flag specified, skipping publish)"
212
+ exit 0
213
+ fi
214
+
215
+ # Sign the plugin (if credentials are available)
216
+ if [ -n "$CERTIFICATE_CHAIN" ] && [ -n "$PRIVATE_KEY" ]; then
217
+ log_info "Signing plugin..."
218
+ ./gradlew signPlugin
219
+
220
+ SIGNED_FILE=$(ls "$BUILD_OUTPUT"/*-signed.zip 2>/dev/null | head -1)
221
+ if [ -n "$SIGNED_FILE" ]; then
222
+ log_info "Signed: $SIGNED_FILE"
223
+ fi
224
+ else
225
+ log_warn "Signing credentials not found. Plugin will be unsigned."
226
+ log_warn "Set CERTIFICATE_CHAIN, PRIVATE_KEY, and PRIVATE_KEY_PASSWORD for signed releases."
227
+ fi
228
+
229
+ if [ "$DRY_RUN" = true ]; then
230
+ log_info "Dry run completed (--dry-run flag specified, skipping publish)"
231
+ exit 0
232
+ fi
233
+
234
+ # Publish to JetBrains Marketplace
235
+ if [ -z "$JETBRAINS_MARKETPLACE_TOKEN" ]; then
236
+ log_error "JETBRAINS_MARKETPLACE_TOKEN is not set."
237
+ log_error "Get your token from: https://plugins.jetbrains.com/author/me/tokens"
238
+ exit 1
239
+ fi
240
+
241
+ log_info "Publishing to JetBrains Marketplace..."
242
+ ./gradlew publishPlugin
243
+
244
+ log_info "Successfully published linthis plugin v$VERSION to JetBrains Marketplace!"
245
+ log_info "View at: https://plugins.jetbrains.com/plugin/29860-linthis"
@@ -7,6 +7,7 @@
7
7
  package com.mojeter.linthis.plugin
8
8
 
9
9
  import com.intellij.openapi.project.Project
10
+ import com.mojeter.linthis.plugin.settings.LinthisSettings
10
11
  import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider
11
12
  import java.io.File
12
13
 
@@ -31,8 +32,22 @@ class LinthisStreamConnectionProvider(private val project: Project) : ProcessStr
31
32
  }
32
33
 
33
34
  private fun buildCommand(): List<String> {
34
- val linthisPath = findLinthisExecutable()
35
- return listOf(linthisPath, "lsp")
35
+ val settings = LinthisSettings.getInstance(project)
36
+ val linthisPath = if (settings.linthisPath.isNotBlank()) {
37
+ settings.linthisPath
38
+ } else {
39
+ findLinthisExecutable()
40
+ }
41
+
42
+ val commands = mutableListOf(linthisPath, "lsp")
43
+
44
+ // Add --use-plugin if configured
45
+ if (settings.usePlugin.isNotBlank()) {
46
+ commands.add("--use-plugin")
47
+ commands.add(settings.usePlugin)
48
+ }
49
+
50
+ return commands
36
51
  }
37
52
 
38
53
  /**
@@ -49,7 +49,7 @@ class LinthisFormatAction : AnAction(), DumbAware {
49
49
  // Run linthis format
50
50
  ApplicationManager.getApplication().executeOnPooledThread {
51
51
  LOG.warn("Running format on file: ${file.path}")
52
- val result = LinthisExecutor.format(file.path, project.basePath, settings.linthisPath)
52
+ val result = LinthisExecutor.format(file.path, project.basePath, settings.linthisPath, settings.usePlugin)
53
53
 
54
54
  ApplicationManager.getApplication().invokeLater {
55
55
  if (result.success) {
@@ -81,7 +81,7 @@ class LinthisDocumentListener : FileDocumentManagerListener {
81
81
  LOG.warn("Running format on save for: ${file.path}")
82
82
 
83
83
  // Format the file in-place (file is already saved to disk)
84
- val result = LinthisExecutor.format(file.path, project.basePath, settings.linthisPath)
84
+ val result = LinthisExecutor.format(file.path, project.basePath, settings.linthisPath, settings.usePlugin)
85
85
 
86
86
  if (result.success) {
87
87
  LOG.warn("Format on save successful, reloading document")
@@ -28,6 +28,7 @@ class LinthisSettings : PersistentStateComponent<LinthisSettings.State> {
28
28
  var lintOnSave: Boolean = true
29
29
  var formatOnSave: Boolean = false
30
30
  var linthisPath: String = ""
31
+ var usePlugin: String = ""
31
32
  var additionalArgs: String = ""
32
33
  }
33
34
 
@@ -53,6 +54,10 @@ class LinthisSettings : PersistentStateComponent<LinthisSettings.State> {
53
54
  get() = myState.linthisPath
54
55
  set(value) { myState.linthisPath = value }
55
56
 
57
+ var usePlugin: String
58
+ get() = myState.usePlugin
59
+ set(value) { myState.usePlugin = value }
60
+
56
61
  var additionalArgs: String
57
62
  get() = myState.additionalArgs
58
63
  set(value) { myState.additionalArgs = value }
@@ -28,6 +28,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
28
28
  private var lintOnSaveCheckbox: JBCheckBox? = null
29
29
  private var formatOnSaveCheckbox: JBCheckBox? = null
30
30
  private var linthisPathField: TextFieldWithBrowseButton? = null
31
+ private var usePluginField: JBTextField? = null
31
32
  private var additionalArgsField: JBTextField? = null
32
33
 
33
34
  override fun getDisplayName(): String = "Linthis"
@@ -47,6 +48,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
47
48
  }
48
49
 
49
50
  additionalArgsField = JBTextField()
51
+ usePluginField = JBTextField()
50
52
 
51
53
  settingsPanel = FormBuilder.createFormBuilder()
52
54
  .addComponent(JBLabel("<html><b>Behavior</b></html>"))
@@ -59,6 +61,14 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
59
61
  JBLabel("Linthis path (leave empty for auto-detect):"),
60
62
  linthisPathField!!
61
63
  )
64
+ .addSeparator()
65
+ .addComponent(JBLabel("<html><b>Plugin</b></html>"))
66
+ .addLabeledComponent(
67
+ JBLabel("<html>Use plugin (e.g., https://github.com/zhlinh/linthis-plugin-template):</html>"),
68
+ usePluginField!!
69
+ )
70
+ .addSeparator()
71
+ .addComponent(JBLabel("<html><b>Advanced</b></html>"))
62
72
  .addLabeledComponent(
63
73
  JBLabel("Additional arguments:"),
64
74
  additionalArgsField!!
@@ -75,6 +85,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
75
85
  lintOnSaveCheckbox?.isSelected != settings.lintOnSave ||
76
86
  formatOnSaveCheckbox?.isSelected != settings.formatOnSave ||
77
87
  linthisPathField?.text != settings.linthisPath ||
88
+ usePluginField?.text != settings.usePlugin ||
78
89
  additionalArgsField?.text != settings.additionalArgs
79
90
  }
80
91
 
@@ -84,6 +95,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
84
95
  settings.lintOnSave = lintOnSaveCheckbox?.isSelected ?: true
85
96
  settings.formatOnSave = formatOnSaveCheckbox?.isSelected ?: false
86
97
  settings.linthisPath = linthisPathField?.text ?: ""
98
+ settings.usePlugin = usePluginField?.text ?: ""
87
99
  settings.additionalArgs = additionalArgsField?.text ?: ""
88
100
  }
89
101
 
@@ -93,6 +105,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
93
105
  lintOnSaveCheckbox?.isSelected = settings.lintOnSave
94
106
  formatOnSaveCheckbox?.isSelected = settings.formatOnSave
95
107
  linthisPathField?.text = settings.linthisPath
108
+ usePluginField?.text = settings.usePlugin
96
109
  additionalArgsField?.text = settings.additionalArgs
97
110
  }
98
111
 
@@ -102,6 +115,7 @@ class LinthisSettingsConfigurable(private val project: Project) : Configurable {
102
115
  lintOnSaveCheckbox = null
103
116
  formatOnSaveCheckbox = null
104
117
  linthisPathField = null
118
+ usePluginField = null
105
119
  additionalArgsField = null
106
120
  }
107
121
  }