Skip to content

Commit 2080286

Browse files
authored
Merge pull request #33 from urfave/windows-tests
Failing linter job on Windows
2 parents 6911257 + a307f7b commit 2080286

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ensure Windows uses proper line endings
2+
*.go text eol=lf

.github/workflows/lint.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
go: [stable]
19-
# disable windows-latest for now
20-
os: [ubuntu-latest, macos-latest]
19+
os: [ubuntu-latest, macos-latest, windows-latest]
2120
name: lint
2221
runs-on: ${{ matrix.os }}
2322
steps:
@@ -28,6 +27,6 @@ jobs:
2827
- name: golangci-lint
2928
uses: golangci/golangci-lint-action@v6
3029
with:
31-
version: v1.60
30+
version: v1.62
3231
- name: run CI
33-
run: make ci
32+
run: make ci

cmd/genvalues/main.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"os"
1212
"os/exec"
1313
"reflect"
14+
"sort"
1415
"strings"
1516
"text/template"
1617
"unicode"
@@ -26,8 +27,8 @@ const (
2627
// This file is autogenerated by "go generate .". Do not modify.
2728
2829
import (
29-
{{range .Imports}}
30-
"{{.}}"{{end}}
30+
{{- range .Imports}}
31+
"{{.}}"{{end}}
3132
)
3233
3334
{{$mapKeyTypes := .MapKeysTypes}}
@@ -538,6 +539,7 @@ func main() {
538539
for _, value := range values {
539540
imports = append(imports, value.Import...)
540541
}
542+
sort.Strings(imports)
541543

542544
baseT := template.New("genvalues").Funcs(template.FuncMap{
543545
"Lower": strings.ToLower,

0 commit comments

Comments
 (0)