Skip to content

GitHub action for use AutoCorrect as lint

License

Notifications You must be signed in to change notification settings

huacnlee/autocorrect-action

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

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 }}}