diff --git a/.github/workflows/generic.checkstyle.yml b/.github/workflows/generic.checkstyle.yml new file mode 100644 index 00000000..a57e6cd2 --- /dev/null +++ b/.github/workflows/generic.checkstyle.yml @@ -0,0 +1,18 @@ +name: 'Generic: Checkstyle' + +on: + workflow_call: + +jobs: + checkstyle: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + + - uses: dbelyaev/action-checkstyle@v0.8.4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + checkstyle_version: 10.12.2 + checkstyle_config: ./config/mv_checks.xml diff --git a/.github/workflows/generic.github_release.yml b/.github/workflows/generic.github_release.yml index 6210d1ed..423c868c 100644 --- a/.github/workflows/generic.github_release.yml +++ b/.github/workflows/generic.github_release.yml @@ -59,7 +59,7 @@ jobs: - name: Build and test uses: gradle/gradle-build-action@v2 with: - arguments: clean build -x assemble -x shadowJar -x checkStyleMain -x checkStyleTest + arguments: clean build -x assemble -x shadowJar env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -76,7 +76,7 @@ jobs: if: steps.release.outputs.release_created == 'true' uses: gradle/gradle-build-action@v2 with: - arguments: publish -x checkStyleMain -x checkStyleTest -x test + arguments: publish -x test env: GITHUB_VERSION: ${{ steps.release.outputs.publish_version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.checkstyle.yml b/.github/workflows/pr.checkstyle.yml new file mode 100644 index 00000000..100efc0b --- /dev/null +++ b/.github/workflows/pr.checkstyle.yml @@ -0,0 +1,9 @@ +name: 'PR: Checkstyle' + +on: + pull_request: + types: [opened, synchronize] + +jobs: + checkstyle: + uses: ./.github/workflows/generic.checkstyle.yml diff --git a/README.md b/README.md index 4fb48bc2..e40d0865 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ [![bukkit](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/supported/bukkit_vector.svg)](https://dev.bukkit.org/projects/multiverse-core) [![Spigot](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/supported/spigot_vector.svg)](https://www.spigotmc.org/resources/multiverse-core.390/) -[![Release](https://img.shields.io/nexus/r/com.onarandombox.multiversecore/Multiverse-Core?label=release&server=https%3A%2F%2Frepo.onarandombox.com%2F)](https://dev.bukkit.org/projects/multiverse-core) -[![Dev builds](https://img.shields.io/nexus/s/com.onarandombox.multiversecore/Multiverse-Core?label=dev%20builds&server=http%3A%2F%2Frepo.onarandombox.com%2F)](https://ci.onarandombox.com/job/Multiverse-Core/) +[![Release](https://img.shields.io/nexus/r/com.onarandombox.multiversecore/multiverse-core?server=https%3A%2F%2Frepo.onarandombox.com&label=release&color=dark-green)](https://dev.bukkit.org/projects/multiverse-core) +[![Dev builds](https://img.shields.io/nexus/s/com.onarandombox.multiversecore/multiverse-core?server=https%3A%2F%2Frepo.onarandombox.com&label=prerelease&color=orange)](https://ci.onarandombox.com/job/Multiverse-Core/) [![Discord](https://img.shields.io/discord/325459248047980545?label=discord&logo=discord)](https://discord.gg/NZtfKky) -[![Support us on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Ddumptruckman%26type%3Dpatrons&style=flat)](https://patreon.com/dumptruckman) -[![License](https://img.shields.io/github/license/Multiverse/Multiverse-Core)](LICENSE.md) +[![Support us on Patreon](https://img.shields.io/badge/donate-patreon-white?logo=patreon)](https://patreon.com/dumptruckman) +[![License](https://img.shields.io/github/license/Multiverse/Multiverse-Core?color=blue)](LICENSE.md) # About diff --git a/build.gradle b/build.gradle index b91729d4..f50aae93 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { id 'java-library' id 'maven-publish' - id 'checkstyle' id 'com.github.johnrengelman.shadow' version '7.1.2' id "org.jetbrains.kotlin.jvm" version "1.8.10" } @@ -269,13 +268,6 @@ processResources { } -checkstyle { - toolVersion = '6.1.1' - configFile file('config/mv_checks.xml') - ignoreFailures = true -} - - javadoc { source = sourceSets.main.allJava classpath = configurations.compileClasspath diff --git a/config/mv_checks.xml b/config/mv_checks.xml index 2048eff5..553c6530 100644 --- a/config/mv_checks.xml +++ b/config/mv_checks.xml @@ -6,136 +6,372 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> - - - + + + + + + - - - - + + + - - - + + + + - - - - + + + + - - - + + + + + - + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +