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 -

- Set Checkstyle Configuration File -

- -- 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 -

- 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 -

- Set Checkstyle Configuration File -

-- 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 @@ com.shengchen.checkstyle parent - 1.3.1 + 1.3.2 com.shengchen.checkstyle.checker jar diff --git a/jdtls.ext/com.shengchen.checkstyle.runner/META-INF/MANIFEST.MF b/jdtls.ext/com.shengchen.checkstyle.runner/META-INF/MANIFEST.MF index aa816c4..e593677 100644 --- a/jdtls.ext/com.shengchen.checkstyle.runner/META-INF/MANIFEST.MF +++ b/jdtls.ext/com.shengchen.checkstyle.runner/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.shengchen.checkstyle.runner Bundle-SymbolicName: com.shengchen.checkstyle.runner;singleton:=true -Bundle-Version: 1.3.1 +Bundle-Version: 1.3.2 Bundle-Activator: com.shengchen.checkstyle.runner.CheckstylePlugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: org.eclipse.jdt.core, diff --git a/jdtls.ext/com.shengchen.checkstyle.runner/pom.xml b/jdtls.ext/com.shengchen.checkstyle.runner/pom.xml index d94990e..169fae2 100644 --- a/jdtls.ext/com.shengchen.checkstyle.runner/pom.xml +++ b/jdtls.ext/com.shengchen.checkstyle.runner/pom.xml @@ -6,7 +6,7 @@ com.shengchen.checkstyle parent - 1.3.1 + 1.3.2 com.shengchen.checkstyle.runner eclipse-plugin diff --git a/jdtls.ext/pom.xml b/jdtls.ext/pom.xml index fee9c6f..cc96320 100644 --- a/jdtls.ext/pom.xml +++ b/jdtls.ext/pom.xml @@ -4,7 +4,7 @@ com.shengchen.checkstyle parent ${base.name} :: Parent - 1.3.1 + 1.3.2 pom Java Checkstyle Runner diff --git a/package-lock.json b/package-lock.json index 14c699a..41f716d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-checkstyle", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 18f5caf..269c03e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-checkstyle", "displayName": "Checkstyle for Java", "description": "%description%", - "version": "1.3.1", + "version": "1.3.2", "author": "Sheng Chen", "publisher": "shengchen", "license": "GNU LGPL V3.0",