Skip to content
code

GitHub Action

Revive Action

v1.1.0 Latest version
Use latest version
code

Revive Action

Lint your Go code with Revive

Installation

Copy and paste the following snippet into your .yml file.

- name: Revive Action
  uses: morphy2k/revive-action@v1.1.0
Learn more about this action in morphy2k/revive-action
Choose a version

Dependabot status

Revive Action

This Action runs Revive on your Go code and adds optional annotations to the check.

Usage

Checkout

- name: Check out code into the Go module directory
  uses: actions/checkout@v1

Use by building from repository

- name: Run Revive Action by building from repository
  uses: morphy2k/revive-action@v1

Use by pulling pre-built image (faster execution time, less secure)

- name: Run Revive Action by pulling pre-built image
  uses: docker://morphy/revive-action:v1

Configuration

  with:
    # Path to your Revive config within the repo (optional)
    config: revive/config.toml
    # Exclude patterns, separated by semicolons (optional)
    exclude: "file.go;foo/bar.go;./foo/bar/..."
  env:
    # GitHub token for annotations (optional)
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Screenshots

Screenshot of annotations

GitHub Annotations

You can’t perform that action at this time.