-
Notifications
You must be signed in to change notification settings - Fork 267
Files in /usr/local/go are processed #149
Comments
Can you walk through the steps in the contributing file? If it's a problem with a linter you should report it to that linter. |
Hi, I did but I kinda figured that if 4 linters produced the same behaviour that it wasn't related to those linters specifically. I also checked the two repositories and noone else filed a related bug, which struck me as weird. I can't be the only one with this problem... But based on your reply I'm guessing I was wrong in that assumption! |
@Dynom did you ever found out what the real cause was (except Xcode)? |
No I haven't found the root cause @bkleef. If you have the same issues and updating cgo/clang doesn't solve it than good luck! |
@Dynom I fixed it by moving |
I encounter the same problem, and tried the solutions suggested above, but it did not work. |
I occasionally see the same issue. Using exclude as well. Not sure how to reproduce. |
I had the same issue.
The solution was to install gcc and a C std library (libc-dev) |
@rayzyar if you use the exclude option it still checks the files but ignores the output. So it takes more time than required which is far from perfect. |
This only occurs on Alpine based official Golang Docker images (golang:alpine) and not on (golang:latest) which is Debian based. Reproduce by:
|
As already mentioned one fix is to install Another option is to set |
I suspect there is a race condition involved. I see this output sporadically. Without knowing the inner workings, perhaps the linting sometimes starts before the C compiler finishes. Or there might be problems with gometalinter running multiple linters concurrently, and having more than one of them try to invoke the compiler. Another possibility could be the compiler failing somehow (perhaps running out of memory). Will try the |
I've been getting this in circleci. It's intermittent and re-running usually fixes it so signs do point to a race condition. I've been using
|
Are you seeing this with |
I am seeing it with a build that was made from |
I'm on |
Reproduced with |
FWIW, I can reproduce this consistently on my Mac by setting $ PATH=/usr/bin:/bin:/usr/sbin:/sbin /Users/alex/.go/bin/gometalinter But this works:
In my case, I install Go via Homebrew, and I have only one Go version installed, which lives in |
I started getting these errors yesterday as well (latest master). But they are not reproducible and only appear sometimes. The |
I came across these errors today. In my case it was caused by custom installation by according to Installing to a custom location go expects default to be at It only works with `export GOROOT=/path/to/custom/go |
Currently the gometalinter does not work correctly with the alpine docker image, as it scans too many directory. See github issues: - kisielk/errcheck#119 - alecthomas/gometalinter#149 As a solution, we add an additional layer with a debian image to the multi-staged docker image. In this image, the gometalinter works correctly.
* working demo for ServiceBroker CRUD Operations * remove unused code * Fix formatting and lint errors * Revert "remove unused code" This reverts commit a01455b. * Add Andreas example; periodically ping the service manager; - Add Andreas example to to a new file 'servicecatalog', which provides methods to list/register/unregister service brokers form the k8s serivce catalog. - Add function to periodically ping the service manager. - Formatting. * Start broker proxy in main.go * Fix constructor, check for error when setting env variable * Use broker lib * First working draft of k8s * Use enablement service-manager * Pin service-catalog to version v0.1.13 * Fix log messages in k8s client * Proxy not needed anymore; Remove secrets/config of the k8s deployment * Downstrip to minimal setup * use in cluster configuration and strip down Dockerfile for friday demo. Adding clusterrole and permissions to access the API server/servicecatalog resources. * fix wrong service declaration - no endpoints assign regarding wrong selector * Fix linter errors - Use 'envProxy' instead of 'env_proxy' - Add short documentation to exported methods to create/update/list/delete brokers in kubernetes - Remove not needed exports. * Use helm for isntallation of service-broker-proxy * Add vendor/ to SCM Not ignoring the vendor folder eases the initial development onboarding and can guarantee reliable builds. * Update dependencies and pin service-broker-proxy lib to fixed version - Set dependencies to version of dem from last week. - Pin version of service-broker-proxy library do working version of last week. * Fix port in service definition in helm chart * Use gcr docker repository as the default in the helm chart * Improve installation instructions * Add additional docker image for gometalinter. Currently the gometalinter does not work correctly with the alpine docker image, as it scans too many directory. See github issues: - kisielk/errcheck#119 - alecthomas/gometalinter#149 As a solution, we add an additional layer with a debian image to the multi-staged docker image. In this image, the gometalinter works correctly. * Update service-broker-proxy library. Update service-broker-proxy library to the most recent version. Adopt client.go to use the newest library version. * Fix client go type error * Improve in-code documentation. * Improve build script for development. Use helm to install the service-broker-proxy-k8s. * Tests: implement tests for successfull service-broker operation. Implement tests for successful service broker operations: create/delete/update/get/sync * File system mock obsolete in client_internal_test * Add go dep dependencies for ginkgo and gomega. * Use better fake urls in unit test. * Improve logging and log levels. - Use warn log-level when an error with the service-catalog occurs and return the error to the service-broker-proxy framework. - Use fatal log level when the creation of a k8s client occurs. * Test output prints more information in docker build. * Test service-broker-creation when catalog returns an error. * Test service-broker-deletion when catalog returns an error. * Test getting service-brokers when catalog returns an error. * Test service-broker-delete when catalog returns an error. * Test syncing service-brokers when catalog returns an error. * Print broker guids/names with log messages * Print go test coverage during build * Print test coverage Added a script to print the test coverage information with the following outputs: - html report - stdout * Use .html filending for coverage report * Return error when clusterconfig cannot be loaded. * More coverage details during Docker build * Improve test coverage Review with @AlexRieder: - use warn log-level when error with service-catalog occurs - Improve test for service-broker-creation - Add test to check getBrokers with empty list of brokers * README badge: Add go report and add branch to coveralls * No error handling, as log.Fatal exists the program * Log error and return error when configuration cannot be loaded * Template values for service-manager-instance
I've faced same error on go 1.11 and gometelinter 0.2.1 For example, give run gotype via gometelinter:
run gotype directly without
run gotype directly with
After Go 1.10, the |
Thanks to @dnephin who already solved this for us over a year ago: alecthomas/gometalinter#149 (comment)
Seeing this after upgrading to Go 1.12, not sure why. Disabling CGO did not seem to help. Still investigating what caused it. EDIT: this is with gometalinter version 2.0.11. EDIT2: Same error on 3.0.0, however, using the following configuration seems to help
Seems a workaround more than a fix though. |
Try switching to golangci-lint instead. The Gometalinter project is (nearing) EOL. |
I'm not (yet) sure why, but some linters generate a report from
/usr/local/go
.I'm on
go version go1.6.2 darwin/amd64
/usr/local/go
is a symlink, not sure if that's significant.I've just ran
gometalinter -fui
with the assumption that all linters are up-to-date.The text was updated successfully, but these errors were encountered: