2024-11-28 13:09:51 +00:00
|
|
|
# Run Go Lint GitHub Action
|
|
|
|
|
|
|
|
This GitHub Action uses `golangci-lint` to lint Go source code, ensuring code quality and adherence to best practices.
|
|
|
|
|
|
|
|
## Inputs
|
|
|
|
|
|
|
|
| Input Name | Description | Required | Type | Default Value |
|
|
|
|
|------------|-----------------------------------|----------|--------|---------------|
|
|
|
|
| `source` | The source files or directories to lint. | No | string | `./...` |
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
The action can be reused with `workflow_call`. Here's an example of how to invoke it:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
uses: DevFW-CICD/lint/.github/workflows/golang-ci-lint.yml@main
|
|
|
|
with:
|
|
|
|
source: './pkg/...'
|
|
|
|
```
|