Skip to content

Commit b46bb14

Browse files
author
Terrance Kennedy
authored
Upgrade gometalinter to v2 (#1741)
Signed-off-by: Terrance Kennedy <terrancerkennedy@gmail.com> ## What is this change? Upgrade gometalinter to v2. ## Why is this change necessary? I upgraded gometalinter in sensu-enterprise-go after submitting a patch for v1 and learning that it is no longer supported. ## Does your change need a Changelog entry? Added! ## Do you need clarification on anything? The `install_deps` function inside build.sh installs gocov and golint, but neither appear to be used anywhere else in the build system. Can they be removed? ## Were there any complications while making this change? The gometalinter command's invocation did not need to be changed, making this an easy PR. ## Have you reviewed and updated the documentation for this change? Is new documentation required? No docs required!
1 parent ab0f458 commit b46bb14

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ commands, which is compatible with `sensuctl create`.
3737
- Added some documentation around extensions.
3838

3939
### Changed
40+
- Upgraded gometalinter to v2.
4041
- Add logging around the Sensu event pipeline.
4142
- Split out the docker commands in build script so that building images and
4243
pushing can be done separately.

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function install_deps
3535
{
3636
echo "Installing deps..."
3737
go get github.com/axw/gocov/gocov
38-
go get gopkg.in/alecthomas/gometalinter.v1
38+
go get gopkg.in/alecthomas/gometalinter.v2
3939
go get github.com/gordonklaus/ineffassign
4040
go get github.com/jgautheron/goconst/cmd/goconst
4141
go get github.com/kisielk/errcheck
@@ -184,7 +184,7 @@ function linter_commands
184184
{
185185
echo "Running linter..."
186186

187-
gometalinter.v1 --vendor --disable-all --enable=vet --linter='vet:go tool vet -composites=false {paths}:PATH:LINE:MESSAGE' --enable=golint --enable=ineffassign --enable=goconst --tests ./...
187+
gometalinter.v2 --vendor --disable-all --enable=vet --linter='vet:go tool vet -composites=false {paths}:PATH:LINE:MESSAGE' --enable=golint --enable=ineffassign --enable=goconst --tests ./...
188188
If ($LASTEXITCODE -ne 0) {
189189
echo "Linting failed..."
190190
exit 1

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ esac
4242
install_deps () {
4343
echo "Installing deps..."
4444
go get github.com/axw/gocov/gocov
45-
go get gopkg.in/alecthomas/gometalinter.v1
45+
go get gopkg.in/alecthomas/gometalinter.v2
4646
go get github.com/gordonklaus/ineffassign
4747
go get github.com/jgautheron/goconst/cmd/goconst
4848
go get honnef.co/go/tools/cmd/megacheck
@@ -179,7 +179,7 @@ build_command () {
179179
linter_commands () {
180180
echo "Running linter..."
181181

182-
gometalinter.v1 --vendor --disable-all --enable=vet --enable=ineffassign --enable=goconst --tests ./...
182+
gometalinter.v2 --vendor --disable-all --enable=vet --enable=ineffassign --enable=goconst --tests ./...
183183
if [ $? -ne 0 ]; then
184184
echo "Linting failed..."
185185
exit 1

0 commit comments

Comments
 (0)