diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 6966bcb..c0ba763 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -1,16 +1,14 @@ name: bld-ci -on: [ push, pull_request, workflow_dispatch ] +on: [push, pull_request, workflow_dispatch] jobs: build-bld-project: + runs-on: ubuntu-latest + strategy: matrix: - java-version: [ 17, 21, 24 ] - kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ] - os: [ ubuntu-latest, windows-latest, macos-latest ] - - runs-on: ${{ matrix.os }} + java-version: [17, 21, 22] steps: - name: Checkout source repository @@ -24,16 +22,11 @@ jobs: distribution: "zulu" java-version: ${{ matrix.java-version }} - - name: Download dependencies [examples] - working-directory: examples + - name: Grant execute permission for bld + run: chmod +x bld + + - name: Download the dependencies run: ./bld download - - name: Compile and Run Checkstyle [examples] - working-directory: examples - run: ./bld compile checkstyle-custom - - - name: Download dependencies - run: ./bld download - - - name: Run tests - run: ./bld compile test \ No newline at end of file + - name: Run tests with bld + run: ./bld compile test diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 508f6a5..bf43624 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -47,11 +47,11 @@ jobs: uses: actions/configure-pages@v3 - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v1 with: # Upload generated Javadocs repository path: "build/javadoc/" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v1 diff --git a/.idea/bld.xml b/.idea/bld.xml deleted file mode 100644 index 6600cee..0000000 --- a/.idea/bld.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index d91f848..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/icon.svg b/.idea/icon.svg deleted file mode 100644 index 81220b4..0000000 --- a/.idea/icon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 153a060..a2969be 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml index 99cc0c0..9bd86aa 100644 --- a/.idea/libraries/compile.xml +++ b/.idea/libraries/compile.xml @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml index d4069f2..2ae5c4b 100644 --- a/.idea/libraries/runtime.xml +++ b/.idea/libraries/runtime.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml index 57ed5ef..b80486a 100644 --- a/.idea/libraries/test.xml +++ b/.idea/libraries/test.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index ce89108..87dd394 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-2.2.1.jar", + "${HOME}/.bld/dist/bld-1.9.1.jar", "lib/**/*.jar" ], "java.compile.nullAnalysis.mode": "automatic" diff --git a/README.md b/README.md index abf2d99..4b7e28d 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,13 @@ -# [Checkstyle](https://checkstyle.sourceforge.io/) Extension for [bld](https://rife2.com/bld) +# [Checkstyle](https://checkstyle.sourceforge.io/) Extension for [bld](https://rife2.com/bldb) [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) -[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/1.9.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-checkstyle/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-checkstyle) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-checkstyle/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-checkstyle) [![GitHub CI](https://github.com/rife2/bld-checkstyle/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-checkstyle/actions/workflows/bld.yml) -To install the latest version, add the following to the `lib/bld/bld-wrapper.properties` file: - -```properties -bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle -``` - -For more information, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) documentation. - -## Check Source Code with Checkstyle +To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions). To check your code with Chesktyle, include the following in your build file: @@ -45,5 +37,5 @@ not provided by the extension. For example: ```java repositories = List.of(MAVEN_CENTRAL); -scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 0))); +scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 17, 0))); ``` diff --git a/checkcliargs.sh b/checkcliargs.sh new file mode 100755 index 0000000..867c768 --- /dev/null +++ b/checkcliargs.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +MAIN="com.puppycrawl.tools.checkstyle.Main" +TMPNEW=/tmp/checkcliargs-new +TMPOLD=/tmp/checkcliargs-old + +java -cp "lib/test/*" $MAIN --help >$TMPNEW +java -cp "examples/lib/test/*" $MAIN --help >$TMPOLD + +if [ "$1" == "-v" ]; then + code --wait --diff $TMPOLD $TMPNEW +else + diff $TMPOLD $TMPNEW +fi + +rm -rf $TMPNEW $TMPOLD diff --git a/config/pmd.xml b/config/pmd.xml index 2641880..3d3203c 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -7,9 +7,9 @@ + + - - diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml index 153a060..a2969be 100644 --- a/examples/.idea/libraries/bld.xml +++ b/examples/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/examples/.idea/libraries/compile.xml b/examples/.idea/libraries/compile.xml index 99cc0c0..9bd86aa 100644 --- a/examples/.idea/libraries/compile.xml +++ b/examples/.idea/libraries/compile.xml @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/examples/.idea/libraries/runtime.xml b/examples/.idea/libraries/runtime.xml index d4069f2..2ae5c4b 100644 --- a/examples/.idea/libraries/runtime.xml +++ b/examples/.idea/libraries/runtime.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/examples/.idea/libraries/test.xml b/examples/.idea/libraries/test.xml index 57ed5ef..b80486a 100644 --- a/examples/.idea/libraries/test.xml +++ b/examples/.idea/libraries/test.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/examples/.idea/misc.xml b/examples/.idea/misc.xml index a01a1f3..97c1009 100644 --- a/examples/.idea/misc.xml +++ b/examples/.idea/misc.xml @@ -1,8 +1,4 @@ - - - -