enable some more linters
This commit is contained in:
23
.golangci.yml
Normal file
23
.golangci.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
linters:
|
||||
enable-all: false
|
||||
enable:
|
||||
- structcheck
|
||||
- varcheck
|
||||
- ineffassign
|
||||
- typecheck
|
||||
- megacheck
|
||||
- deadcode
|
||||
- govet
|
||||
- errcheck
|
||||
- goimports
|
||||
- depguard
|
||||
- goconst
|
||||
- unconvert
|
||||
- gocritic
|
||||
|
||||
linters-settings:
|
||||
depguard:
|
||||
list-type: whitelist
|
||||
packages:
|
||||
- github.com/mmcloughlin/avo
|
||||
- golang.org/x/arch/x86
|
||||
@@ -1,6 +1,8 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.11.1
|
||||
install:
|
||||
- ./script/bootstrap
|
||||
script:
|
||||
- ./script/lint
|
||||
- go test ./...
|
||||
|
||||
@@ -374,8 +374,7 @@ func operand(op opcodesxml.Operand) inst.Operand {
|
||||
func datasize(f opcodesxml.Form) int {
|
||||
// Determine from encoding bits.
|
||||
e := f.Encoding
|
||||
switch {
|
||||
case e.VEX != nil && e.VEX.W == nil:
|
||||
if e.VEX != nil && e.VEX.W == nil {
|
||||
return 128 << e.VEX.L
|
||||
}
|
||||
|
||||
|
||||
@@ -3,3 +3,6 @@
|
||||
# Ensure the repository is clean after code generation.
|
||||
./script/generate
|
||||
test -z "$(git status --porcelain)"
|
||||
|
||||
# Run suite of golangci-lint checks.
|
||||
golangci-lint run
|
||||
|
||||
Reference in New Issue
Block a user