Skip to content
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

1.19.0: no go files to analyze #761

Closed
andig opened this issue Sep 30, 2019 · 11 comments
Closed

1.19.0: no go files to analyze #761

andig opened this issue Sep 30, 2019 · 11 comments
Labels
bug Something isn't working dependencies Relates to an upstream dependency feedback required Requires additional feedback
Projects

Comments

@andig
Copy link

andig commented Sep 30, 2019

This seems a breaking, undocumented change coming from 1.18.0. Running with 1.18 does find files for linting.

Please include the following information:

  1. Version of golangci-lint: golangci-lint --version (or git commit if you don't use binary distribution)
❯ golangci-lint run --version
golangci-lint has version 1.19.0 built from 27ac4c7 on 2019-09-23T20:40:07Z
  1. Config file: cat .golangci.yml
❯ cat .golangci.yml
issues:
  exclude:
  - "`sunspecModelID` is unused"
  - "`printModel` is unused"
  - "U1000: func `..sunSpec..sanitizeModels` is unused"
  - "U1000: func `..SunSpecCore..snip16int` is unused"
  - "U1000: func `..SunSpecCore..snip32` is unused"
  1. Go environment: go version && go env
❯ go version && go env
go version go1.13 darwin/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/andig/Library/Caches/go-build"
GOENV="/Users/andig/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/andig/htdocs/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/andig/htdocs/mbmd/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/w5/_c0nb6n90fn96tzw04dtc6240000gn/T/go-build702025501=/tmp/go-build -gno-record-gcc-switches -fno-common"
  1. Verbose output of running: golangci-lint run -v
❯ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/andig/htdocs/mbmd /Users/andig/htdocs /Users/andig /Users /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck] 
INFO [lintersdb] Optimized sublinters [staticcheck gosimple unused] into metalinter megacheck 
INFO [loader] Go packages loading at mode 1023 (syntax|types|types_info|compiled_files|deps|name|types_sizes|exports_file|files|imports) took 1.515926345s 
ERRO Running error: context loading failed: no go files to analyze 
INFO Memory: 21 samples, avg is 68.9MB, max is 68.9MB 
INFO Execution took 1.918671903s               
```
@tpounds tpounds added the bug Something isn't working label Oct 1, 2019
@jirfag
Copy link
Member

jirfag commented Oct 2, 2019

I guess it's caused by x/tools update

@tpounds tpounds added the feedback required Requires additional feedback label Oct 2, 2019
@tpounds tpounds added the dependencies Relates to an upstream dependency label Oct 6, 2019
@Sheshagiri
Copy link

this is present in v1.20.0 as well.

Executing command: golangci-lint --version                                                                                                                       
golangci-lint has version 1.20.0 built from cc98739 on 2019-10-08T18:36:35Z                                                                                      
------------------------------                                                                                                                                   
Executing command: make lint                                                                                                                                     
golangci-lint -c /codefresh/volume/waas/lint-configs/.golangci.yml      run                                                                                      
Reading environment variable exporting file contents.                                                                                                            
ERRO Running error: context loading failed: no go files to analyze                                                                                                                                                                  
ERRO Timeout exceeded: try increase it by passing --timeout option 

@howardjohn
Copy link

Is there a workaround for this?

@Shareed2k
Copy link

Can you run linter with this envs GL_DEBUG=linters_output GOPACKAGESPRINTGOLISTERRORS=1, maybe it will help you understand, what happen ?!

@pprishchepa
Copy link

The issue could be caused by the renaming of deadline option to timeout in 0cc87df. So you have to replace deadline with timeout in your config or command-line options.

@andig
Copy link
Author

andig commented Oct 10, 2019

I‘m not using either option.

@jzelinskie
Copy link

Just wanted to note that I had this issue and when I ran GL_DEBUG=linters_output GOPACKAGESPRINTGOLISTERRORS=1 golangci-lint -v run, it made it clear that my go.sum had an integrity issue. I just deleted the go.sum and regenerated it.

@jirfag jirfag added this to High priority in Zero Bug Oct 15, 2019
@DiegoEliasCosta
Copy link

I also found the same issue with version 1.20.1, running the analysis with default parameters with the repository referred in the demo (https://github.com/astaxie/beego).

@dixonwille
Copy link

#825 is this related. Could it be the same issue? That it isn't building that is.

@jirfag
Copy link
Member

jirfag commented Oct 23, 2019

I guess it’s the same

@andig
Copy link
Author

andig commented Oct 23, 2019

I'm closing this one since I can no longer reproduce the root issue on a different machine. As per comments I'd suggest to check if code is error-free and open separate issue if problem persists.

@andig andig closed this as completed Oct 23, 2019
Zero Bug automation moved this from High priority to Closed Oct 23, 2019
theckman pushed a commit to theckman/golangci-lint that referenced this issue May 3, 2020
$ git cherry --abbrev -v 0af0999fabfb ee9bf5809ead
+ abd8436 all: enable Go modules on CI (golangci#753)
+ 3c9d0fb checkers: recognize //line and //nolint in commentFormatting (golangci#756)
+ 0b517d7 checkers: extend deprecatedComment patterns (golangci#757)
+ 09100f6 checkers: use astcast package instead of coerce.go (golangci#758)
+ 2e9e97f checker: simplify boolExprSimplify (golangci#759)
+ 575701e make: add go-consistent to CI checks list (golangci#761)
+ b55f431 checkers: fix unlambda handling of builtins (golangci#763)
+ 5a7dee3 checker: handle lambdas properly in boolExprSimplify (golangci#765)
+ 5ce3939 checkers: teach boolExprSimplify a few new tricks (golangci#766)
+ 04d160f checkers: add new patterns to boolExprSimplify (golangci#768)
+ 09582e2 make: collect coverprofile separately from goveralls (golangci#769)
+ d8d0ee4 checkers: recognize NOTE pattern in deprecatedComment (golangci#770)
+ 12f0f85 Update copyright notice to 2019 (golangci#771)
+ f54bdb6 checkers: add stringXbytes checker
+ 170d65c checkers: followup for golangci#773 (golangci#774)
+ 84e9e83 checkers: make stringXbytes more linear (golangci#775)
+ a800815 checkers: add Depreacted typo pattern (golangci#776)
+ 6751be9 checkers: add hexLiterals (golangci#772)
+ ac61906 checkers: add typeAssertChain checker (golangci#782)
+ d19dbf1 checkers: add codegenComment checker (golangci#783)
+ d82b576 checkers: proper pkg/obj check for flagName (golangci#786)
+ dfcf754 ci: enable integration tests (golangci#787)
+ 5dafc45 checkers: fix equalFold false positive (golangci#788)
+ ed5e8e7 checkers: refactor and fix hexLiteral checker (golangci#789)
+ e704e07 checkers: add argOrder checker (golangci#790)
+ 34c1dc8 checkers: add Split handling to argOrder checker (golangci#791)
+ cbe095d checkers: add math.Max and math.Min to dupArg (golangci#792)
+ c986ee5 checkers: add checkers info fields test (golangci#794)
+ 66e5832 cmd/makedocs: use lintpack, fix build (golangci#793)
+ 6bce9d0 cmd/makedocs: add enabled/disabled by default info (golangci#795)
+ 4adbf9a checkers: simplify flagName (golangci#799)
+ 07de34a checkers: add octalLiteral checker (golangci#798)
+ 765907a cmd/makedocs: add checker param docs (golangci#796)
+ ee9bf58 cmd/makedocs: fix headers formatting (golangci#803)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Relates to an upstream dependency feedback required Requires additional feedback
Projects
No open projects
Zero Bug
  
Closed
Development

No branches or pull requests

10 participants