Skip to content

Different results with golint #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vetheslav opened this issue Oct 23, 2018 · 2 comments
Closed

Different results with golint #253

vetheslav opened this issue Oct 23, 2018 · 2 comments

Comments

@vetheslav
Copy link

vetheslav commented Oct 23, 2018

Hello, there are some problems with golint:

  1. golangci-lint version:
mac-179s-Mac-mini:go-common mac-179$ golangci-lint --version
golangci-lint has version 1.10.2 built from dbfcf63 on 2018-09-02T12:28:26Z
mac-179s-Mac-mini:go-common mac-179$ 
  1. Go environment:
mac-179s-Mac-mini:go-common mac-179$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mac-179/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mac-179/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.1/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/mac-179/go/src/provider/project/go-common/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jd/ztdfrvdj55g0lxwgrhgm8hjc0000gn/T/go-build927102157=/tmp/go-build -gno-record-gcc-switches -fno-common"
  1. golangci-lint output:
mac-179s-Mac-mini:go-common mac-179$ golangci-lint -v run --disable-all -E golint
INFO [config_reader] Config search paths: [./ /Users/mac-179/go/src/provider/project/go-common /Users/mac-179/go/src/provider/project /Users/mac-179/go/src/provider /Users/mac-179/go/src /Users/mac-179/go /Users/mac-179 /Users /] 
INFO [lintersdb] Active 1 linters: [golint]       
INFO [load/path_resolver] Skipped dirs: [.git .idea] 
INFO [load/path_resolver] Paths resolving took 7.122595ms: [auth cmd/jwkconverter enum errors firebase google/pubsub grpc/inventory grpc/mail grpc/purchase grpc/push grpc/shopping_list grpc/short_link grpc/sms grpc/supplier grpc/sync handler middleware request util validate] 
INFO [runner] worker.2 took 20.594µs              
INFO [runner] worker.4 took 11.986µs              
INFO [runner] worker.1 took 46.328µs              
INFO [runner] worker.3 took 457.546139ms with stages: golint: 457.505556ms 
INFO [runner] Workers idle times: #1: 457.425886ms, #2: 457.444336ms, #4: 457.431638ms 
INFO [runner] processing took 594.876µs with stages: autogenerated_exclude: 399.859µs, path_prettifier: 80.265µs, cgo: 73.752µs, exclude: 35.941µs, max_same_issues: 1.458µs, nolint: 779ns, max_from_linter: 618ns, source_code: 486ns, uniq_by_line: 451ns, diff: 448ns, skip_files: 425ns, max_per_file_from_linter: 394ns 
INFO Memory: 5 samples, avg is 68.9MB, max is 68.9MB 
INFO Execution took 485.948344ms                  
mac-179s-Mac-mini:go-common mac-179$ 
  1. golint output:
mac-179s-Mac-mini:go-common mac-179$ golint ./...
enum/volume.go:78:1: exported method Volume.Name should have comment or be unexported
mac-179s-Mac-mini:go-common mac-179$
  1. code:
func VolumeList() []Volume {
	return volumeUnits
}
@AlekSi
Copy link
Contributor

AlekSi commented Oct 24, 2018

That's due to default exclude rules. https://github.com/golangci/golangci-lint#command-line-options, see flag --exclude-use-default.

@vetheslav
Copy link
Author

Thank you, @AlekSi! It works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants