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
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.11.1
|
- 1.11.1
|
||||||
|
install:
|
||||||
|
- ./script/bootstrap
|
||||||
script:
|
script:
|
||||||
- ./script/lint
|
- ./script/lint
|
||||||
- go test ./...
|
- go test ./...
|
||||||
|
|||||||
@@ -374,8 +374,7 @@ func operand(op opcodesxml.Operand) inst.Operand {
|
|||||||
func datasize(f opcodesxml.Form) int {
|
func datasize(f opcodesxml.Form) int {
|
||||||
// Determine from encoding bits.
|
// Determine from encoding bits.
|
||||||
e := f.Encoding
|
e := f.Encoding
|
||||||
switch {
|
if e.VEX != nil && e.VEX.W == nil {
|
||||||
case e.VEX != nil && e.VEX.W == nil:
|
|
||||||
return 128 << e.VEX.L
|
return 128 << e.VEX.L
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,6 @@
|
|||||||
# Ensure the repository is clean after code generation.
|
# Ensure the repository is clean after code generation.
|
||||||
./script/generate
|
./script/generate
|
||||||
test -z "$(git status --porcelain)"
|
test -z "$(git status --porcelain)"
|
||||||
|
|
||||||
|
# Run suite of golangci-lint checks.
|
||||||
|
golangci-lint run
|
||||||
|
|||||||
Reference in New Issue
Block a user