From 422027265f01a25e664b5650d95517d3b94105e6 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Wed, 15 May 2024 16:06:02 +0200 Subject: [PATCH] Added README.md file with repository description --- .github/workflows/create_github_release.yml | 31 +++++++++-- README.md | 58 +++++++++++++++++++++ RELEASE | 1 - 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 README.md delete mode 100644 RELEASE diff --git a/.github/workflows/create_github_release.yml b/.github/workflows/create_github_release.yml index e653dfc..5d53861 100644 --- a/.github/workflows/create_github_release.yml +++ b/.github/workflows/create_github_release.yml @@ -5,8 +5,9 @@ permissions: jobs: build: name: Create Github Release - runs-on: ubuntu-latest + outputs: + myOutput: ${{ steps.step1.outputs.myOutput }} steps: - name: Checkout code uses: actions/checkout@v3 @@ -23,6 +24,28 @@ jobs: - name: Setup gpg private key run: | echo "${{secrets.GPG_PRIVATE_KEY}}" > maven-secret-key.asc - - uses: ncipollo/release-action@v1 - with: - tag: v1.0.4 \ No newline at end of file + - name: Generate jar + run: | + ./gradlew jar + echo $versionName + - name: Read file and store value in variable + run: | + MY_VERSION=$(grep '^versionName' gradle.properties | cut -d'=' -f2) + echo "Version name from gradle.properties: $MY_VERSION" + echo "##[set-output name=versionName]$MY_VERSION" + shell: bash + - name: Step 1 + id: step1 + run: echo "::set-output name=myOutput::Hello from Job 1" + # - uses: ncipollo/release-action@v1 + # with: + # tag: ${{ steps.build.outputs.versionName }} + # replacesArtifacts: true + # artifacts: build/libs/detekt-rules.jar + + job2: + needs: job1 + runs-on: ubuntu-latest + steps: + - name: Step 2 + run: echo "Output from Job 1 ${{ needs.build.outputs.myOutput }}" \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..459add7 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +[![](https://jitpack.io/v/Kiolk/Detekt-rules.svg)](https://jitpack.io/#Kiolk/Detekt-rules) ![Maven Central Version](https://img.shields.io/maven-central/v/io.github.kiolk/kiolk-detekt-rules) ![GitHub Release](https://img.shields.io/github/v/release/kiolk/detekt-rules?color=yellow) + +# kiolk-detekt-rules + +--- +Hello folks. This repository contains my own Detekt rules that born in result my work how developer. I am planning to add new rules in the future. You are welcome to contribute! + + +# How add to the project + +--- +You have different options how you can add this set of rules to your project.  + +## Maven +To use Maven Central repository, you should add link on `mavenCentral()` in repositories block in `build.gradle.kt` file + +```kotlin +repositories { + mavenCentral() + } +``` +In `dependencies` block in `build.gradle.kt` of module where you will use detekt add reference on library that points on the latest version +```kotlin +detektPlugins("io.github.kiolk:kiolk-detekt-rules:1.0.4") +``` + +## Jitpack +To use Jitpack, you should add link on jitpack in repositories block in `build.gradle.kt` file + +```kotlin +repositories { + maven { url 'https://jitpack.io' } + } +``` +In `dependencies` block in `build.gradle.kt` of module where you will use detekt add reference on library that points on the latest version +```kotlin +detektPlugins("com.github.Kiolk:Detekt-rules:v1.0.4") +``` + +## Local artifacts +If you want to use only locally, you should add path to `jar` file on your local machine. Latest artifacts you can find in [release section](https://github.com/Kiolk/Detekt-rules/releases) of repository. +```kotlin +detektPlugins(files("local_path_to_artifact.jar")) + +``` + +# Configuration + +--- + +# Rules: + +--- + +## UseInvokeForOperator +### Motivation +### Cases +### AutoCorrection diff --git a/RELEASE b/RELEASE deleted file mode 100644 index 4701b46..0000000 --- a/RELEASE +++ /dev/null @@ -1 +0,0 @@ -tag: v1.0.4