.travis.yml and don't use internal package
This commit is contained in:
parent
0e107e1d78
commit
5c2e6e9f5a
6
.travis.yml
Normal file
6
.travis.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
sudo: false
|
||||||
|
language: go
|
||||||
|
go:
|
||||||
|
- 1.9.x
|
||||||
|
- 1.10.x
|
||||||
|
script: make test
|
1
Makefile
1
Makefile
@ -1,3 +1,4 @@
|
|||||||
test:
|
test:
|
||||||
|
go install ./cmd/...
|
||||||
golangci-lint run
|
golangci-lint run
|
||||||
go test -v -race ./...
|
go test -v -race ./...
|
||||||
|
@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/golangci/golangci-lint/internal/commands"
|
"github.com/golangci/golangci-lint/pkg/commands"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
pkg/testdata/with_issues/deadcode.go
vendored
4
pkg/testdata/with_issues/deadcode.go
vendored
@ -2,12 +2,12 @@ package testdata
|
|||||||
|
|
||||||
var y int
|
var y int
|
||||||
|
|
||||||
var unused int // ERROR "`unused` is unused"
|
var unused int // nolint:megacheck // ERROR "`unused` is unused"
|
||||||
|
|
||||||
func f(x int) {
|
func f(x int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func g(x int) { // ERROR "`g` is unused"
|
func g(x int) { // nolint:megacheck // ERROR "`g` is unused"
|
||||||
}
|
}
|
||||||
|
|
||||||
func H(x int) {
|
func H(x int) {
|
||||||
|
4
pkg/testdata/with_issues/structcheck.go
vendored
4
pkg/testdata/with_issues/structcheck.go
vendored
@ -1,5 +1,5 @@
|
|||||||
package testdata
|
package testdata
|
||||||
|
|
||||||
type t struct { // ERROR "`t` is unused"
|
type t struct { // nolint:megacheck // ERROR "`t` is unused"
|
||||||
unusedField int // ERROR "`unusedField` is unused"
|
unusedField int // nolint:megacheck // ERROR "`unusedField` is unused"
|
||||||
}
|
}
|
||||||
|
2
pkg/testdata/with_issues/varcheck.go
vendored
2
pkg/testdata/with_issues/varcheck.go
vendored
@ -1,3 +1,3 @@
|
|||||||
package testdata
|
package testdata
|
||||||
|
|
||||||
var v string // ERROR "`v` is unused"
|
var v string // nolint:megacheck // ERROR "`v` is unused"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user