Skip to content

Commit

Permalink
Update lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lvmingze123 authored Oct 11, 2024
1 parent 6a50c24 commit 3f6a98d
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: Lint Code
name: Go Code Style Check

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main

jobs:
lint:
code_style_check:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.23.1'
go-version: 1.23.1

- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- name: Run gofmt
run: gofmt -l -w.

- name: Run golangci-lint
run: golangci-lint run ./...
- name: Run golint
run: golint./...

- name: Run go vet
run: go vet./...

0 comments on commit 3f6a98d

Please sign in to comment.