Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Jul 11, 2024
1 parent 964c48c commit 59fd1d8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
name: Go
on: [push]
jobs:

test:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v2
with:
go-version: 1.16

- uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version: 1.22

- name: lint
run: go install github.com/ysmood/golangci-lint@latest && golangci-lint
if: matrix.os == 'ubuntu-latest'
- name: lint
run: go run github.com/ysmood/golangci-lint@latest -v 1.58.0
if: matrix.os == 'ubuntu-latest'

- name: test
run: |
go generate
go test
- name: test
run: |
go generate
go test
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: macos-latest # TODO: if we use ubuntu, the cross-built won't work in docker

steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.18

- uses: actions/checkout@v2

- name: release
run: |
go generate
Expand Down
11 changes: 3 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@

run:
skip-dirs-use-default: false

linters:
enable:
- gofmt
- golint
- gocyclo
- misspell

gocyclo:
min-complexity: 15
linters-settings:
gocyclo:
min-complexity: 15

issues:
exclude-use-default: false

1 change: 1 addition & 0 deletions cmd/leakless/os_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package main
Expand Down

0 comments on commit 59fd1d8

Please sign in to comment.