/autocorrect-action

GitHub action for use AutoCorrect as lint

Primary LanguageShellMIT LicenseMIT

autocorrect-action

GitHub Action to use AutoCorrect for lint.

https://github.com/huacnlee/autocorrect

autocorrect lint output

Usage

steps:
  - uses: actions/checkout@v4
  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@v2

Use NPM version AutoCorrect

steps:
  - uses: actions/checkout@v4
  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@v2
    with:
      use_npm: true

Enable ReviewDog for Report

steps:
  - uses: actions/checkout@v4
  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@v2
  - name: Report ReviewDog
    if: failure()
    uses: huacnlee/autocorrect-action@v2
    env:
      REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      reviewdog: true
image

Only check changed file by PR

steps:
  - uses: actions/checkout@v4
  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@v2
    with:
      args: --lint --no-diff-bg-color $(git diff --diff-filter=AM --name-only ${{ github.event.pull_request.base.sha }}}