Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.85 KB

check-go-task.md

File metadata and controls

56 lines (37 loc) · 1.85 KB

"Check Go" workflow (Task)

Workflow file: check-go-task.yml

Lint and check formatting of a Go module.

Assets

  • [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)

Readme badge

Markdown badge:

[![Check Go status](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/check-go-task.yml/badge.svg)](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).

Commit message

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

PR message

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