🎨 启用linter

This commit is contained in:
Ink33
2021-05-30 23:07:08 +08:00
parent b25fe2d233
commit 580fd16ceb
7 changed files with 142 additions and 4 deletions

24
.github/workflows/golint.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Lint
on: [push]
jobs:
golangci:
name: lint_golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2.5.2
with:
version: latest
- name: Commit back
continue-on-error: true
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add --all
git commit -m "🎨 改进代码样式"
git push

20
.github/workflows/suggester.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Suggester
on: [pull_request]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2.5.2
with:
version: latest
- name: Suggester
uses: reviewdog/action-suggester@v1.0.1
with:
tool_name: golangci-lint