forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ethereum#34 from etclabscore/go-modules
Add go modules support.
- Loading branch information
Showing
1,527 changed files
with
602 additions
and
809,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linters-settings: | ||
goconst: | ||
min-occurrences: 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,21 +325,20 @@ func doTest(cmdline []string) { | |
build.MustRun(gotest) | ||
} | ||
|
||
// runs gometalinter on requested packages | ||
// runs golangci-lint on requested packages | ||
func doLint(cmdline []string) { | ||
flag.CommandLine.Parse(cmdline) | ||
|
||
packages := []string{"./..."} | ||
if len(flag.CommandLine.Args()) > 0 { | ||
packages = flag.CommandLine.Args() | ||
} | ||
// Get metalinter and install all supported linters | ||
build.MustRun(goTool("get", "gopkg.in/alecthomas/gometalinter.v2")) | ||
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v2"), "--install") | ||
// Get golangci-lint and install all supported linters | ||
build.MustRun(goTool("get", "github.com/golangci/golangci-lint/cmd/[email protected]")) | ||
|
||
// Run fast linters batched together | ||
configs := []string{ | ||
"--vendor", | ||
"run", | ||
"--tests", | ||
"--deadline=2m", | ||
"--disable-all", | ||
|
@@ -349,14 +348,13 @@ func doLint(cmdline []string) { | |
"--enable=gofmt", | ||
"--enable=misspell", | ||
"--enable=goconst", | ||
"--min-occurrences=6", // for goconst | ||
} | ||
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v2"), append(configs, packages...)...) | ||
build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs, packages...)...) | ||
|
||
// Run slow linters one by one | ||
for _, linter := range []string{"unconvert", "gosimple"} { | ||
configs = []string{"--vendor", "--tests", "--deadline=10m", "--disable-all", "--enable=" + linter} | ||
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v2"), append(configs, packages...)...) | ||
configs = []string{"run", "--tests", "--deadline=10m", "--disable-all", "--enable=" + linter} | ||
build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs, packages...)...) | ||
} | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.