Workflow file: check-go-task.yml
Lint and check formatting of a Go module.
- [
Taskfile.yml
](assets/check-go-task/Taskfile.yml] - Linting and formatting tasks.- Install to: repository root (or add the tasks into the existing
Taskfile.yml
)
- Install to: repository root (or add the tasks into the existing
Markdown badge:
[](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/check-go-task.yml)
Replace the REPO_OWNER
and REPO_NAME
placeholders in the URLs with the final repository owner and name (example).
Asciidoc badge:
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-go-task.yml/badge.svg["Check Go status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-go-task.yml"]
Define the {repository-owner}
and {repository-name}
attributes and use them throughout the readme (example).
Add CI workflow to lint and check formatting of Go code
On every push and pull request that affects relevant files, and periodically, check the Go module for:
- Common detectable errors in the code.
- Use of outdated APIs
- Code style violations
- Code formatting inconsistency
- Misconfiguration
On every push and pull request that affects relevant files, and periodically, check the repository's [Go](https://golang.org/) module for:
- Common detectable errors in the code.
- Use of outdated APIs
- Code style violations
- Code formatting inconsistency
- Misconfiguration