Skip to content

Commit

Permalink
Merge pull request #14 from edwarnicke/C
Browse files Browse the repository at this point in the history
Skip import of "C"
  • Loading branch information
edwarnicke authored Feb 3, 2021
2 parents b9aefcb + abed3d1 commit 279243c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ linters-settings:
golint:
min-confidence: 0.8
goimports:
local-prefixes: github.com/networkservicemesh/cmd-forwarder-vppagent
local-prefixes: github.com/edwarnicke/imports-gen
gocyclo:
min-complexity: 15
maligned:
Expand Down Expand Up @@ -161,3 +161,7 @@ issues:
linters:
- funlen
text: "Function 'main' has too many statements"
- path: main.go
linters:
- gocyclo
text: "func `main` is high"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func main() {
rawPackages := strings.Split(strings.TrimSpace(string(packagesBytes)), "\n")
packagesSeen := make(map[string]bool)
for _, pkg := range rawPackages {
if !strings.HasPrefix(pkg, modPath) && !packagesSeen[pkg] {
if !(strings.HasPrefix(pkg, modPath) || packagesSeen[pkg] || (pkg == "C")) {
input.Packages = append(input.Packages, pkg)
packagesSeen[pkg] = true
}
Expand Down

0 comments on commit 279243c

Please sign in to comment.