Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morphy2k/revive-action
GitHub Action that runs Revive on your Go code
https://github.com/morphy2k/revive-action
action annotations code go lint quality revive static-analysis utility
Last synced: about 17 hours ago
JSON representation
GitHub Action that runs Revive on your Go code
- Host: GitHub
- URL: https://github.com/morphy2k/revive-action
- Owner: morphy2k
- License: mit
- Created: 2019-08-30T23:16:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-05T04:50:55.000Z (about 2 months ago)
- Last Synced: 2025-01-15T08:29:11.531Z (8 days ago)
- Topics: action, annotations, code, go, lint, quality, revive, static-analysis, utility
- Language: Go
- Homepage:
- Size: 221 KB
- Stars: 39
- Watchers: 2
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Revive Action
This Action runs [Revive](https://github.com/mgechev/revive) on your [Go](https://golang.org/) code and adds annotations to the check.
## Usage
### Checkout
```YAML
- name: Check out code into the Go module directory
uses: actions/checkout@v4
```### Use by pulling pre-built image
#### Docker Hub image
```YAML
- name: Run Revive Action by pulling pre-built image
uses: docker://morphy/revive-action:v2
```#### GitHub Container registry image
```YAML
- name: Run Revive Action by pulling pre-built image
uses: docker://ghcr.io/morphy2k/revive-action:v2
```> [!NOTE]
> Using a pre-built image is more resource-efficient and has a shorter execution time.### Use by building from repository
```YAML
- name: Run Revive Action by building from repository
uses: morphy2k/revive-action@v2
```### Configuration
```YAML
with:
# Path to your Revive config within the repo (optional)
config: revive.toml# Exclude patterns (default: vendor/...)
exclude: |
file.go
foo/bar.go
./foo/bar/...# Path pattern (default: ./...)
path: ./foo/...# Fail on any issue. Overrides the error and warning code in config (default: false)
fail-on-any: true
```### Workflow example
```YAML
name: Linton:
pull_request:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'revive.toml'jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:- name: Check out code into the Go module directory
uses: actions/checkout@v4- name: Run Revive Action
uses: docker://morphy/revive-action:v2
with:
config: revive.toml
```## Screenshots
![Screenshot of annotations](screenshot.png)
_GitHub Annotations_