8000 GitHub - yutailang0119/action-ktlint: GitHub Action for ktlint
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yutailang0119/action-ktlint

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action for ktlint

action-ktlint status

This Action generates annotations from ktlint Report XML.

Usage

An example workflow(.github/workflows/ktlint.yml) to executing ktlint follows:

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

Author

Yutaro Muta

References

License

action-ktlint is available under the MIT license. See the LICENSE file for more info.

About

GitHub Action for ktlint

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0