mirror of
https://github.com/coredns/coredns.git
synced 2025-12-29 13:17:12 -05:00
use reviewdog to automatically suggest whitespace corrections in PRs so that code will be clean before committing into master branch. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
24 lines
568 B
YAML
24 lines
568 B
YAML
name: Reviewdog
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
gofmt:
|
|
name: Go Fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: find . -not -path '*/\.git/*' -type f -name '*.go' -exec gofmt -s -w {} \+
|
|
- uses: reviewdog/action-suggester@v1
|
|
|
|
whitespace:
|
|
name: Whitespace
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: find . -not -path '*/\.git/*' -type f -not -name '*.go' -exec sed -i 's/[[:space:]]\{1,\}$//' {} \+
|
|
- uses: reviewdog/action-suggester@v1
|