Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-circle

GitHub Action

golintr

v2.1.0-beta Pre-release

golintr

GitHub Action to run golint

Usage

Inputs

path

Path where your Go files are. This path will be used by golint command to check code of this files. Defaults to the repository root including all sub-directories (./...).

FYI, the /... suffix is used to includes all sub-directories, remove it if you only want to check files of the given directory.

Outputs

errors

The output of golint if the command fail.

For Example:

internal/cmd/root.go:17:1: exported function Execute should have comment or be unexported

Basic Setup

---

name: "Lint Go Files"

on:
  push:

jobs:
  golintr:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Go
        uses: actions/setup-go@v3

      - name: Run Golint
        uses: norwd/golintr@v2
        with:
          path: ./src/...