.travis.yml and don't use internal package

This commit is contained in:
golangci 2018-05-13 19:11:01 +03:00
parent 0e107e1d78
commit 5c2e6e9f5a
10 changed files with 13 additions and 6 deletions

6
.travis.yml Normal file
View File

@ -0,0 +1,6 @@
sudo: false
language: go
go:
- 1.9.x
- 1.10.x
script: make test

View File

@ -1,3 +1,4 @@
test:
go install ./cmd/...
golangci-lint run
go test -v -race ./...

View File

@ -3,7 +3,7 @@ package main
import (
"log"
"github.com/golangci/golangci-lint/internal/commands"
"github.com/golangci/golangci-lint/pkg/commands"
"github.com/sirupsen/logrus"
)

View File

@ -2,12 +2,12 @@ package testdata
var y int
var unused int // ERROR "`unused` is unused"
var unused int // nolint:megacheck // ERROR "`unused` is unused"
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) {

View File

@ -1,5 +1,5 @@
package testdata
type t struct { // ERROR "`t` is unused"
unusedField int // ERROR "`unusedField` is unused"
type t struct { // nolint:megacheck // ERROR "`t` is unused"
unusedField int // nolint:megacheck // ERROR "`unusedField` is unused"
}

View File

@ -1,3 +1,3 @@
package testdata
var v string // ERROR "`v` is unused"
var v string // nolint:megacheck // ERROR "`v` is unused"