Skip to content

Commit 04ae482

Browse files
authored
Merge pull request #1335 from hypnoglow/enable-linters
Enable linters for golangci-lint
2 parents 525e8cd + 41765a3 commit 04ae482

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/scaffold/project/project_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Copyright %s Example Owners.
133133
})
134134

135135
It("should skip writing Gopkg.toml", func() {
136-
e := strings.Replace(string(result.Golden), project.DefaultGopkgHeader, "", -1)
136+
e := strings.Replace(result.Golden, project.DefaultGopkgHeader, "", -1)
137137
_, err = f.Write([]byte(e))
138138
Expect(err).NotTo(HaveOccurred())
139139
Expect(f.Close()).NotTo(HaveOccurred())
@@ -158,7 +158,7 @@ Copyright %s Example Owners.
158158
})
159159

160160
It("should keep the user content", func() {
161-
e := strings.Replace(string(result.Golden),
161+
e := strings.Replace(result.Golden,
162162
project.DefaultGopkgUserContent, "Hello World", -1)
163163
_, err = f.Write([]byte(e))
164164
Expect(err).NotTo(HaveOccurred())

scripts/verify.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ golangci-lint run --disable-all --deadline 5m \
3737
--enable=maligned \
3838
--enable=misspell \
3939
--enable=nakedret \
40+
--enable=prealloc \
41+
--enable=scopelint \
4042
--enable=staticcheck \
4143
--enable=structcheck \
44+
--enable=typecheck \
45+
--enable=unconvert \
4246
--enable=unparam \
4347
--enable=unused \
4448
--enable=varcheck \

0 commit comments

Comments
 (0)