Skip to content

Commit

Permalink
Merge pull request #1208 from wzshiming/ci/lint
Browse files Browse the repository at this point in the history
Add lint for non-linux
  • Loading branch information
wzshiming authored Sep 2, 2024
2 parents ba2e4c8 + 5a5309d commit f840dce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ env:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -22,4 +29,4 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
version: v${{ env.GOLANGCI_VERSION }}
args: --timeout=30m --config=.golangci.yaml
args: --timeout=8m --config=.golangci.yaml --new --fix
2 changes: 1 addition & 1 deletion pkg/utils/path/path_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ import (
// Clean is a wrapper around filepath.Clean that converts all path separators to
// forward slashes. This is useful for Windows paths that are used in URLs.
func Clean(p string) string {
return strings.Replace(filepath.Clean(p), `\`, `/`, -1)
return strings.ReplaceAll(filepath.Clean(p), `\`, `/`)
}

0 comments on commit f840dce

Please sign in to comment.