From c79a926930fc3a135e9bad1a85ba5e82dea76c18 Mon Sep 17 00:00:00 2001 From: Michael McLoughlin Date: Mon, 31 Dec 2018 11:01:50 -0800 Subject: [PATCH] lint: enable some more linters --- .golangci.yml | 4 ++++ pass/cfg_test.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d067c69..1606fe3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,10 @@ linters: enable-all: false enable: + - gosimple + - misspell + - gocyclo + - gofmt - structcheck - varcheck - ineffassign diff --git a/pass/cfg_test.go b/pass/cfg_test.go index adddc3d..d51a479 100644 --- a/pass/cfg_test.go +++ b/pass/cfg_test.go @@ -12,8 +12,8 @@ import ( func TestLabelTarget(t *testing.T) { expect := map[avo.Label]*avo.Instruction{ - "lblA": &avo.Instruction{Opcode: "A"}, - "lblB": &avo.Instruction{Opcode: "B"}, + "lblA": {Opcode: "A"}, + "lblB": {Opcode: "B"}, } f := avo.NewFunction("happypath")