-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
linter should ignore C/C++ sources #433
Comments
thank you! |
bkrebsbach
pushed a commit
to asecurityteam/sdcli
that referenced
this issue
May 3, 2019
…nings The latest version of the sdcli container throws a warning due to compilation errors when running the `sdcli go lint` command. Here's an example: ```bash docker run -ti \ --mount src="/Users/bkrebsbach/work/code/go/src/github.com/asecurityteam/nexpose-asset-attributor",target="/go/src/github.com/asecurityteam/nexpose-asset-attributor",type="bind" \ -w "/go/src/github.com/asecurityteam/nexpose-asset-attributor" \ asecurityteam/sdcli:v1 go lint WARN [runner/megacheck] Can't run megacheck because of compilation errors in packages [github.com/asecurityteam/nexpose-asset-attributor/pkg/domain github.com/asecurityteam/nexpose-asset-attributor github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor [github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor.test] github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1 [github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1.test]]: pkg/domain/alias.go:1: /usr/local/go/src/internal/bytealg/compare_amd64.s:5:1: illegal character U+0023 '#' and 130 more errors: run `golangci-lint run --no-config --disable-all -E typecheck` to see all errors ``` This appears to be a result of golangci/golangci-lint#433, which was fixed in golangci-lint v1.16.0.
bkrebsbach
pushed a commit
to asecurityteam/sdcli
that referenced
this issue
May 3, 2019
…nings The latest version of the sdcli container throws a warning due to compilation errors when running the `sdcli go lint` command. Here's an example: ```bash docker run -ti \ --mount src="/Users/bkrebsbach/work/code/go/src/github.com/asecurityteam/nexpose-asset-attributor",target="/go/src/github.com/asecurityteam/nexpose-asset-attributor",type="bind" \ -w "/go/src/github.com/asecurityteam/nexpose-asset-attributor" \ asecurityteam/sdcli:v1 go lint WARN [runner/megacheck] Can't run megacheck because of compilation errors in packages [github.com/asecurityteam/nexpose-asset-attributor/pkg/domain github.com/asecurityteam/nexpose-asset-attributor github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor [github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor.test] github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1 [github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1.test]]: pkg/domain/alias.go:1: /usr/local/go/src/internal/bytealg/compare_amd64.s:5:1: illegal character U+0023 '#' and 130 more errors: run `golangci-lint run --no-config --disable-all -E typecheck` to see all errors ``` This appears to be a result of golangci/golangci-lint#433, which was fixed in golangci-lint v1.16.0.
bkrebsbach
pushed a commit
to asecurityteam/sdcli
that referenced
this issue
May 6, 2019
* Update golanci-lint version in container to fix compilation error warnings The latest version of the sdcli container throws a warning due to compilation errors when running the `sdcli go lint` command. Here's an example: ```bash docker run -ti \ --mount src="/Users/bkrebsbach/work/code/go/src/github.com/asecurityteam/nexpose-asset-attributor",target="/go/src/github.com/asecurityteam/nexpose-asset-attributor",type="bind" \ -w "/go/src/github.com/asecurityteam/nexpose-asset-attributor" \ asecurityteam/sdcli:v1 go lint WARN [runner/megacheck] Can't run megacheck because of compilation errors in packages [github.com/asecurityteam/nexpose-asset-attributor/pkg/domain github.com/asecurityteam/nexpose-asset-attributor github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor [github.com/asecurityteam/nexpose-asset-attributor/pkg/assetattributor.test] github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1 [github.com/asecurityteam/nexpose-asset-attributor/pkg/handlers/v1.test]]: pkg/domain/alias.go:1: /usr/local/go/src/internal/bytealg/compare_amd64.s:5:1: illegal character U+0023 '#' and 130 more errors: run `golangci-lint run --no-config --disable-all -E typecheck` to see all errors ``` This appears to be a result of golangci/golangci-lint#433, which was fixed in golangci-lint v1.16.0. * Add go1.12.x to Travis builds * Replace system-provided pip package with download from pypa.io
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like linter tries to analyze
*.cc
files that may occur incgo
projects. Since it treats them just like common*.go
files, it causes false arams.main.go:
This file can be compiled and run, but doesn't pass typecheck:
Version of golangci-lint:
golangci-lint --version
(or git commit if you don't use binary distribution)7514bf823931b8c777a68ba7a7af8e5217fff191
Config file:
cat .golangci.yml
No config file is used.
Go environment:
go version && go env
golangci-lint run -v
The text was updated successfully, but these errors were encountered: