From 98ced26a4c9e89ea73181c58920b2f870dbddc7e Mon Sep 17 00:00:00 2001 From: Tej Pratap Singh Date: Thu, 11 Dec 2025 19:01:26 +0530 Subject: [PATCH] Add ktlint GitHub Actions workflow --- .github/workflows/ktlint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ktlint.yml diff --git a/.github/workflows/ktlint.yml b/.github/workflows/ktlint.yml new file mode 100644 index 00000000..252a0fe5 --- /dev/null +++ b/.github/workflows/ktlint.yml @@ -0,0 +1,27 @@ +name: ktlint + +on: + pull_request: + paths: + - .github/workflows/ktlint.yml + - 'src/**/*.kt' + - '**.kts' + +jobs: + ktlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - run: | + curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.7.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/ + - name: run ktlint + run: | + ktlint --reporter=checkstyle,output=build/ktlint-report.xml + continue-on-error: true + - uses: yutailang0119/action-ktlint@v4 + with: + report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob + ignore-warnings: true # Ignore Lint Warnings + continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1.