Skip to content

Commit

Permalink
workflow: gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
A. Schulze committed Nov 14, 2023
1 parent 8fef394 commit e915118
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: gofmt
on:
push:
pull_request:
jobs:
run_gofmt:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
with:
go-version: 'stable' # echo "go version" in the log
- name: run gofmt
shell: sh
run: |
files_with_format_issues="$( find . -name '*.go' -print0 | xargs --null --no-run-if-empty gofmt -l )"
echo 'files_with_format_issues:'
echo "${files_with_format_issues}"
num_files_with_format_issues="$( echo "${files_with_format_issues}" | grep --text --count '^./' || : )"
echo 'num_files_with_format_issues:'
echo "${num_files_with_format_issues}"
exit ${num_files_with_format_issues}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## next

- updated Github workflows
- use go-1.21.x
- fix some dependenies

## 2.1.0

- valid Cache-Control header
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Actions Status](https://github.com/andreasschulze/scmdhttpd/workflows/Go%20Build/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions?query=workflow%3AGo%20Build)
[![Actions Status](https://github.com/andreasschulze/scmdhttpd/workflows/CodeQL/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions?query=workflow%3ACodeQL)
[![gofmt](https://github.com/andreasschulze/scmdhttpd/actions/workflows/gofmt.yml/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions/workflows/gofmt.yml)
[![markdownlint](https://github.com/andreasschulze/scmdhttpd/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions/workflows/markdownlint.yml)
[![shellcheck](https://github.com/andreasschulze/scmdhttpd/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions/workflows/shellcheck.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/andreasschulze/scmdhttpd)](https://goreportcard.com/report/github.com/andreasschulze/scmdhttpd)
Expand Down

0 comments on commit e915118

Please sign in to comment.