/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:
  - name: Check source code
    uses: actions/checkout@main

  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@main

Use NPM version AutoCorrect

steps:
  - name: Check source code
    uses: actions/checkout@main

  - name: AutoCorrect
    uses: huacnlee/autocorrect-action@main
    with:
      use_npm: true

Enable ReviewDog for Report

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

Only check changed file by PR

steps:
  - name: Check source code
    uses: actions/checkout@main

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