mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
move lint into ci yaml
This commit is contained in:
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@ -85,3 +85,18 @@ jobs:
|
|||||||
- name: Check Cheatsheet
|
- name: Check Cheatsheet
|
||||||
run: |
|
run: |
|
||||||
go run scripts/cheatsheet/main.go check
|
go run scripts/cheatsheet/main.go check
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
- name: Format code
|
||||||
|
run: |
|
||||||
|
if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
|
||||||
|
find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
20
.github/workflows/lint.yml
vendored
20
.github/workflows/lint.yml
vendored
@ -1,20 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Lint
|
|
||||||
uses: golangci/golangci-lint-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
- name: Format code
|
|
||||||
run: |
|
|
||||||
if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
|
|
||||||
find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Reference in New Issue
Block a user