diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 11:03:29 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 11:12:04 +1100 |
commit | e524e398423f8aea2961302287123085dcc5a524 (patch) | |
tree | ea6a2a7862aabbd1e012bb529052f9cd0c736844 /.github | |
parent | e8a1a4ffc0ab0e10ee0ad43042dd5a2fd2438353 (diff) |
move lint into ci yaml
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 15 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 20 |
2 files changed, 15 insertions, 20 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa6bfb1e4..efa898bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,3 +85,18 @@ jobs: - name: Check Cheatsheet run: | 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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 08e339d8d..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -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 |