diff --git a/.vscode/settings.json b/.vscode/settings.json index 0d45058..722e690 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,4 +14,5 @@ "java.checkstyle.properties": { "checkstyle.header.file": "${workspaceFolder}/jdtls.ext/config/java.header" }, + "java.configuration.updateBuildConfiguration": "automatic", } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e20b94..0d931b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to the "vscode-checkstyle" extension will be documented in t Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [1.3.2] +### Added +- Support customized Checkstyle modules ([#206](https://github.com/jdneo/vscode-checkstyle/issues/206)) + ## [1.3.1] ### Fixed - [Bugs fixed](https://github.com/jdneo/vscode-checkstyle/issues?q=is%3Aissue+is%3Aclosed+milestone%3A1.3.1+label%3Abug) diff --git a/README.md b/README.md index f83b81b..f680f44 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,9 @@ ## Features -### Set Checkstyle Version -
- -
- -- You can use the command `Checkstyle: Set the Checkstyle Version` to manually set the Checkstyle version according to your project preferences. The extension will automatically download the required jar files if they do not exist locally. - ### Set Checkstyle Configuration File -- -
+ +![demo](https://raw.githubusercontent.com/jdneo/vscode-checkstyle/master/docs/gifs/setConfiguration.gif) - To set the configuration file, Just Right click the `.xml` file and select `Set the Checkstyle Configuration File`. @@ -50,23 +42,37 @@ - **Google's Check** - **Sun's Check** +### Set Checkstyle Version + +![demo](https://raw.githubusercontent.com/jdneo/vscode-checkstyle/master/docs/gifs/setVersion(lower).gif) + +- You can use the command `Checkstyle: Set the Checkstyle Version` to manually set the Checkstyle version according to your project preferences. The extension will automatically download the required jar files if they do not exist locally. + ### Check the Style and Fix the Violations -- -
-- When opening or saving a Java file, the extension will check the file format and provide quick fixes if possible. You can click the ![bulb](https://raw.githubusercontent.com/jdneo/vscode-checkstyle/master/docs/imgs/btn_bulb.png) button in the editor to show the available quick fixes. +![demo](https://raw.githubusercontent.com/jdneo/vscode-checkstyle/master/docs/gifs/liveLinting.gif) + +- When editing a Java file, the extension will check the file format and provide quick fixes if possible. You can click the ![bulb](https://raw.githubusercontent.com/jdneo/vscode-checkstyle/master/docs/imgs/btn_bulb.png) button in the editor to show the available quick fixes. + + ## Settings | Setting Name | Description | Default Value | |---|---|---| | `java.checkstyle.configuration` | Specify the path of the Checkstyle configuration file. The path can either be a local file path or a URL. | `""` | | `java.checkstyle.properties` | Specify the customized properties used in the Checkstyle configuration. | `{}` | +| `java.checkstyle.modules` | Specify the third-party modules used for Checkstyle. | `[]` | | `java.checkstyle.autocheck` | Specify if the extension will check the format automatically or not. | `true` | -> Note: You can use the `${workspaceFolder}` to represent the path of the workspace folder of the file to be checked. For example: +> Note: You can use the `${workspaceFolder}` to represent the path of the workspace folder of the file to be checked. For example: -```javascript +```json +"java.checkstyle.modules": [ + "${workspaceFolder}/src/main/resources/sevntu-checks-1.35.0.jar" +] +``` +or +```json "java.checkstyle.properties": { "basedir": "${workspaceFolder}" } diff --git a/docs/gifs/liveLinting.gif b/docs/gifs/liveLinting.gif new file mode 100644 index 0000000..13faffe Binary files /dev/null and b/docs/gifs/liveLinting.gif differ diff --git a/docs/gifs/setConfiguration.gif b/docs/gifs/setConfiguration.gif new file mode 100644 index 0000000..4aa2dac Binary files /dev/null and b/docs/gifs/setConfiguration.gif differ diff --git a/docs/gifs/setVersion(lower).gif b/docs/gifs/setVersion(lower).gif new file mode 100644 index 0000000..281d600 Binary files /dev/null and b/docs/gifs/setVersion(lower).gif differ diff --git a/jdtls.ext/com.shengchen.checkstyle.checker/pom.xml b/jdtls.ext/com.shengchen.checkstyle.checker/pom.xml index d841bec..a2a005d 100644 --- a/jdtls.ext/com.shengchen.checkstyle.checker/pom.xml +++ b/jdtls.ext/com.shengchen.checkstyle.checker/pom.xml @@ -6,7 +6,7 @@